home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1997-10-07 | 21.0 KB | [TEXT/MPS ] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
1%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue Oct 7 02:46:29 1997, modified Tue Oct 7 02:46:29 1997, creator 'MPS ', type ASCII, 20822 bytes "CSApp.h" , at 0x51d6 428 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| dearkID
| deark: macbinary
| default
| |
100%
| lsar
| MacBinary
| default
| |
100%
| librempegprobeID
| NGC (Nintendo DSP Standard) (ngcdspstd)
| default (weak)
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPS ] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 07 43 53 41 70 70 2e | 68 00 00 00 00 00 00 00 |..CSApp.|h.......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 51 56 00 | 00 01 ac b0 5f 8b 45 b0 |.....QV.|...._.E.|
|00000060| 5f 8b 45 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |_.E.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 0b 6a 00 00 |........|.....j..|
|00000080| 0d 23 69 66 6e 64 65 66 | 20 5f 5f 43 53 41 50 50 |.#ifndef| __CSAPP|
|00000090| 5f 5f 0d 23 64 65 66 69 | 6e 65 20 5f 5f 43 53 41 |__.#defi|ne __CSA|
|000000a0| 50 50 5f 5f 0d 0d 2f 2a | 20 66 69 6c 65 20 43 53 |PP__../*| file CS|
|000000b0| 41 70 70 2e 68 20 43 6f | 70 79 72 69 67 68 74 20 |App.h Co|pyright |
|000000c0| 28 43 29 20 31 39 39 36 | 2c 20 31 39 39 37 20 62 |(C) 1996|, 1997 b|
|000000d0| 79 20 4a 6f 68 6e 20 52 | 2e 20 4d 6f 6e 74 62 72 |y John R|. Montbr|
|000000e0| 69 61 6e 64 2e 20 20 41 | 6c 6c 20 52 69 67 68 74 |iand. A|ll Right|
|000000f0| 73 20 52 65 73 65 72 76 | 65 64 2e 0d 09 63 61 6c |s Reserv|ed...cal|
|00000100| 6c 62 61 63 6b 20 73 6b | 65 6c 65 74 6f 6e 20 61 |lback sk|eleton a|
|00000110| 70 70 6c 69 63 61 74 69 | 6f 6e 2c 20 64 65 66 69 |pplicati|on, defi|
|00000120| 6e 69 74 69 6f 6e 73 2e | 0d 09 43 6f 70 79 72 69 |nitions.|..Copyri|
|00000130| 67 68 74 20 28 63 29 20 | 31 39 39 37 20 62 79 20 |ght (c) |1997 by |
|00000140| 4a 6f 68 6e 20 4d 6f 6e | 74 62 72 69 61 6e 64 2e |John Mon|tbriand.|
|00000150| 20 20 41 6c 6c 20 52 69 | 67 68 74 73 20 52 65 73 | All Ri|ghts Res|
|00000160| 65 72 76 65 64 2e 0d 09 | 50 65 72 6d 69 73 73 69 |erved...|Permissi|
|00000170| 6f 6e 20 67 72 61 6e 74 | 65 64 20 66 6f 72 20 70 |on grant|ed for p|
|00000180| 75 62 6c 69 63 20 75 73 | 65 2e 0d 09 44 69 73 74 |ublic us|e...Dist|
|00000190| 72 69 62 75 74 65 20 66 | 72 65 65 6c 79 20 69 6e |ribute f|reely in|
|000001a0| 20 61 72 65 61 73 20 77 | 68 65 72 65 20 74 68 65 | areas w|here the|
|000001b0| 20 6c 61 77 73 20 6f 66 | 20 63 6f 70 79 72 69 67 | laws of| copyrig|
|000001c0| 68 74 20 61 70 70 6c 79 | 2e 0d 09 55 53 45 20 41 |ht apply|...USE A|
|000001d0| 54 20 59 4f 55 52 20 4f | 57 4e 20 52 49 53 4b 2e |T YOUR O|WN RISK.|
|000001e0| 0d 09 44 4f 20 4e 4f 54 | 20 44 49 53 54 52 49 42 |..DO NOT| DISTRIB|
|000001f0| 55 54 45 20 4d 4f 44 49 | 46 49 45 44 20 43 4f 50 |UTE MODI|FIED COP|
|00000200| 49 45 53 2e 0d 09 43 6f | 6d 6d 65 6e 74 73 2f 71 |IES...Co|mments/q|
|00000210| 75 65 73 74 69 6f 6e 73 | 2f 70 6f 73 74 63 61 72 |uestions|/postcar|
|00000220| 64 73 20 74 6f 20 74 68 | 65 20 61 75 74 68 6f 72 |ds to th|e author|
|00000230| 20 61 74 20 74 68 65 20 | 61 64 64 72 65 73 73 3a | at the |address:|
|00000240| 0d 09 09 4a 6f 68 6e 20 | 4d 6f 6e 74 62 72 69 61 |...John |Montbria|
|00000250| 6e 64 0d 09 09 50 2e 4f | 2e 20 42 6f 78 2e 20 31 |nd...P.O|. Box. 1|
|00000260| 31 33 33 0d 09 09 53 61 | 73 6b 61 74 6f 6f 6e 20 |133...Sa|skatoon |
|00000270| 53 61 73 6b 61 74 63 68 | 65 77 61 6e 20 43 61 6e |Saskatch|ewan Can|
|00000280| 61 64 61 0d 09 09 53 37 | 4b 20 33 4e 32 0d 09 6f |ada...S7|K 3N2..o|
|00000290| 72 20 62 79 20 65 6d 61 | 69 6c 20 61 74 3a 0d 09 |r by ema|il at:..|
|000002a0| 09 74 69 6e 79 6a 6f 68 | 6e 40 73 6b 2e 73 79 6d |.tinyjoh|n@sk.sym|
|000002b0| 70 61 74 69 63 6f 2e 63 | 61 0d 09 49 66 20 79 6f |patico.c|a..If yo|
|000002c0| 75 20 77 6f 75 6c 64 20 | 6c 69 6b 65 20 74 6f 20 |u would |like to |
|000002d0| 68 61 76 65 3a 0d 09 09 | 74 65 63 68 6e 69 63 61 |have:...|technica|
|000002e0| 6c 20 73 75 70 70 6f 72 | 74 20 72 65 67 61 72 64 |l suppor|t regard|
|000002f0| 69 6e 67 20 74 68 69 73 | 20 66 69 6c 65 2c 20 73 |ing this| file, s|
|00000300| 65 6e 64 20 61 20 70 6f | 73 74 63 61 72 64 2e 0d |end a po|stcard..|
|00000310| 09 73 65 65 20 61 6c 73 | 6f 3a 0d 09 09 68 74 74 |.see als|o:...htt|
|00000320| 70 3a 2f 2f 77 77 77 33 | 2e 73 6b 2e 73 79 6d 70 |p://www3|.sk.symp|
|00000330| 61 74 69 63 6f 2e 63 61 | 2f 74 69 6e 79 6a 6f 68 |atico.ca|/tinyjoh|
|00000340| 6e 0d 2a 2f 0d 0d 23 69 | 6e 63 6c 75 64 65 20 3c |n.*/..#i|nclude <|
|00000350| 54 79 70 65 73 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |Types.h>|.#includ|
|00000360| 65 20 3c 51 75 69 63 6b | 44 72 61 77 2e 68 3e 0d |e <Quick|Draw.h>.|
|00000370| 23 69 6e 63 6c 75 64 65 | 20 3c 4d 65 6e 75 73 2e |#include| <Menus.|
|00000380| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 57 69 6e |h>.#incl|ude <Win|
|00000390| 64 6f 77 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |dows.h>.|#include|
|000003a0| 20 3c 44 69 61 6c 6f 67 | 73 2e 68 3e 0d 23 69 6e | <Dialog|s.h>.#in|
|000003b0| 63 6c 75 64 65 20 3c 41 | 70 70 6c 65 45 76 65 6e |clude <A|ppleEven|
|000003c0| 74 73 2e 68 3e 0d 0d 2f | 2a 20 76 65 72 73 69 6f |ts.h>../|* versio|
|000003d0| 6e 20 6f 66 20 74 68 69 | 73 20 69 6e 74 65 72 66 |n of thi|s interf|
|000003e0| 61 63 65 20 2a 2f 0d 23 | 64 65 66 69 6e 65 20 6b |ace */.#|define k|
|000003f0| 43 53 41 70 70 56 65 72 | 73 69 6f 6e 20 31 0d 0d |CSAppVer|sion 1..|
|00000400| 0d 2f 2a 20 41 53 53 4f | 52 54 45 44 20 55 54 49 |./* ASSO|RTED UTI|
|00000410| 4c 49 54 49 45 53 20 2a | 2f 0d 0d 2f 2a 20 54 72 |LITIES *|/../* Tr|
|00000420| 61 70 41 76 61 69 6c 20 | 72 65 74 75 72 6e 73 20 |apAvail |returns |
|00000430| 74 72 75 65 20 69 66 20 | 74 68 65 20 69 6e 64 69 |true if |the indi|
|00000440| 63 61 74 65 64 20 74 72 | 61 70 20 69 73 20 64 65 |cated tr|ap is de|
|00000450| 66 69 6e 65 64 2e 20 2a | 2f 0d 42 6f 6f 6c 65 61 |fined. *|/.Boolea|
|00000460| 6e 20 54 72 61 70 41 76 | 61 69 6c 28 75 6e 73 69 |n TrapAv|ail(unsi|
|00000470| 67 6e 65 64 20 73 68 6f | 72 74 20 74 68 65 54 72 |gned sho|rt theTr|
|00000480| 61 70 29 3b 0d 0d 2f 2a | 20 47 6f 74 52 65 71 50 |ap);../*| GotReqP|
|00000490| 61 72 61 6d 20 63 68 65 | 63 6b 73 20 74 68 65 20 |aram che|cks the |
|000004a0| 61 70 70 6c 65 45 76 65 | 6e 74 20 74 6f 20 65 6e |appleEve|nt to en|
|000004b0| 73 75 72 65 20 61 6c 6c | 20 6f 66 20 74 68 65 20 |sure all| of the |
|000004c0| 72 65 71 75 69 72 65 64 | 0d 09 70 61 72 61 6d 65 |required|..parame|
|000004d0| 74 65 72 73 20 61 72 65 | 20 70 72 65 73 65 6e 74 |ters are| present|
|000004e0| 2e 20 2a 2f 0d 4f 53 45 | 72 72 20 47 6f 74 52 65 |. */.OSE|rr GotRe|
|000004f0| 71 50 61 72 61 6d 28 63 | 6f 6e 73 74 20 41 70 70 |qParam(c|onst App|
|00000500| 6c 65 45 76 65 6e 74 20 | 2a 61 70 70 6c 65 5f 65 |leEvent |*apple_e|
|00000510| 76 65 6e 74 29 3b 0d 0d | 2f 2a 20 78 70 72 69 6e |vent);..|/* xprin|
|00000520| 74 66 20 63 61 6c 6c 73 | 20 44 65 62 75 67 53 74 |tf calls| DebugSt|
|00000530| 72 20 75 73 69 6e 67 20 | 74 68 65 20 73 74 72 69 |r using |the stri|
|00000540| 6e 67 20 67 65 6e 65 72 | 61 74 65 64 20 62 79 20 |ng gener|ated by |
|00000550| 66 6d 74 20 61 6e 64 20 | 74 68 65 0d 09 6f 70 74 |fmt and |the..opt|
|00000560| 69 6f 6e 61 6c 20 70 61 | 72 61 6d 65 74 65 72 73 |ional pa|rameters|
|00000570| 2e 20 2a 2f 0d 76 6f 69 | 64 20 78 70 72 69 6e 74 |. */.voi|d xprint|
|00000580| 66 28 63 68 61 72 2a 20 | 66 6d 74 2c 20 2e 2e 2e |f(char* |fmt, ...|
|00000590| 29 3b 0d 0d 2f 2a 20 45 | 44 49 54 49 4e 47 20 43 |);../* E|DITING C|
|000005a0| 4f 4d 4d 41 4e 44 53 20 | 2a 2f 0d 0d 2f 2a 20 73 |OMMANDS |*/../* s|
|000005b0| 74 61 6e 64 61 72 64 20 | 65 64 69 74 20 6d 65 6e |tandard |edit men|
|000005c0| 75 20 69 74 65 6d 73 20 | 2a 2f 0d 23 64 65 66 69 |u items |*/.#defi|
|000005d0| 6e 65 20 69 55 6e 64 6f | 20 31 0d 23 64 65 66 69 |ne iUndo| 1.#defi|
|000005e0| 6e 65 20 69 43 75 74 20 | 33 0d 23 64 65 66 69 6e |ne iCut |3.#defin|
|000005f0| 65 20 69 43 6f 70 79 20 | 34 0d 23 64 65 66 69 6e |e iCopy |4.#defin|
|00000600| 65 20 69 50 61 73 74 65 | 20 35 0d 23 64 65 66 69 |e iPaste| 5.#defi|
|00000610| 6e 65 20 69 43 6c 65 61 | 72 20 36 0d 0d 2f 2a 20 |ne iClea|r 6../* |
|00000620| 44 69 61 6c 6f 67 45 64 | 69 74 20 69 73 20 61 75 |DialogEd|it is au|
|00000630| 74 6f 6d 61 74 69 63 61 | 6c 6c 79 20 63 61 6c 6c |tomatica|lly call|
|00000640| 65 64 20 62 79 20 43 61 | 6c 6c 45 64 69 74 43 6f |ed by Ca|llEditCo|
|00000650| 6d 6d 61 6e 64 20 61 6e | 64 20 79 6f 75 20 73 68 |mmand an|d you sh|
|00000660| 6f 75 6c 64 20 6f 6e 6c | 79 0d 09 68 61 76 65 20 |ould onl|y..have |
|00000670| 74 6f 20 63 61 6c 6c 20 | 69 74 20 69 66 20 79 6f |to call |it if yo|
|00000680| 75 20 64 65 66 69 6e 65 | 20 79 6f 75 72 20 6f 77 |u define| your ow|
|00000690| 6e 20 45 64 69 74 44 69 | 61 6c 6f 67 46 75 6e 63 |n EditDi|alogFunc|
|000006a0| 2e 20 49 74 20 63 61 6c | 6c 73 20 44 69 61 6c 6f |. It cal|ls Dialo|
|000006b0| 67 43 75 74 2c 0d 09 44 | 69 61 6c 6f 67 43 6f 70 |gCut,..D|ialogCop|
|000006c0| 79 2c 20 44 69 61 6c 6f | 67 50 61 73 74 65 2c 20 |y, Dialo|gPaste, |
|000006d0| 6f 72 20 44 69 61 6c 6f | 67 44 65 6c 65 74 65 2e |or Dialo|gDelete.|
|000006e0| 20 2a 2f 0d 76 6f 69 64 | 20 44 69 61 6c 6f 67 45 | */.void| DialogE|
|000006f0| 64 69 74 28 73 68 6f 72 | 74 20 69 74 65 6d 6e 6f |dit(shor|t itemno|
|00000700| 29 3b 0d 0d 2f 2a 20 43 | 61 6c 6c 45 64 69 74 43 |);../* C|allEditC|
|00000710| 6f 6d 6d 61 6e 64 20 64 | 69 73 70 61 74 63 68 65 |ommand d|ispatche|
|00000720| 73 20 74 68 65 20 65 64 | 69 74 69 6e 67 20 63 6f |s the ed|iting co|
|00000730| 6d 6d 61 6e 64 20 74 6f | 20 74 68 65 20 63 6f 72 |mmand to| the cor|
|00000740| 72 65 63 74 20 68 61 6e | 64 6c 65 72 20 64 65 70 |rect han|dler dep|
|00000750| 65 6e 64 69 6e 67 0d 09 | 6f 6e 20 77 69 6e 64 6f |ending..|on windo|
|00000760| 77 4b 69 6e 64 20 66 69 | 65 6c 64 20 6f 66 20 74 |wKind fi|eld of t|
|00000770| 68 65 20 63 75 72 72 65 | 6e 74 20 66 72 6f 6e 74 |he curre|nt front|
|00000780| 20 77 69 6e 64 6f 77 2e | 20 20 45 69 74 68 65 72 | window.| Either|
|00000790| 20 44 69 61 6c 6f 67 45 | 64 69 74 2c 20 74 68 65 | DialogE|dit, the|
|000007a0| 0d 09 45 64 69 74 44 69 | 61 6c 6f 67 46 75 6e 63 |..EditDi|alogFunc|
|000007b0| 2c 20 6f 72 20 74 68 65 | 20 45 64 69 74 57 69 6e |, or the| EditWin|
|000007c0| 64 6f 77 46 75 6e 63 20 | 77 69 6c 6c 20 62 65 20 |dowFunc |will be |
|000007d0| 63 61 6c 6c 65 64 2e 20 | 2a 2f 0d 76 6f 69 64 20 |called. |*/.void |
|000007e0| 43 61 6c 6c 45 64 69 74 | 43 6f 6d 6d 61 6e 64 28 |CallEdit|Command(|
|000007f0| 73 68 6f 72 74 20 65 64 | 69 74 63 6d 64 29 3b 0d |short ed|itcmd);.|
|00000800| 0d 0d 0d 0d 2f 2a 20 4d | 41 49 4e 20 44 52 49 56 |..../* M|AIN DRIV|
|00000810| 45 52 20 52 4f 55 54 49 | 4e 45 53 20 2a 2f 0d 0d |ER ROUTI|NES */..|
|00000820| 2f 2a 20 4f 70 65 6e 43 | 53 41 70 70 20 64 6f 65 |/* OpenC|SApp doe|
|00000830| 73 20 61 6c 6c 20 6f 66 | 20 74 68 65 20 6e 65 63 |s all of| the nec|
|00000840| 65 73 73 61 72 79 20 69 | 6e 69 74 69 61 6c 69 7a |essary i|nitializ|
|00000850| 61 74 69 6f 6e 20 72 65 | 71 75 69 72 65 64 20 66 |ation re|quired f|
|00000860| 6f 72 20 6d 61 63 69 6e | 74 6f 73 68 0d 09 61 70 |or macin|tosh..ap|
|00000870| 70 6c 69 63 61 74 69 6f | 6e 73 2e 20 20 73 74 61 |plicatio|ns. sta|
|00000880| 63 6b 5f 6b 69 6c 6f 62 | 79 74 65 73 20 73 68 6f |ck_kilob|ytes sho|
|00000890| 75 6c 64 20 62 65 20 73 | 65 74 20 74 6f 20 74 68 |uld be s|et to th|
|000008a0| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 61 64 64 69 |e number| of addi|
|000008b0| 74 69 6f 6e 61 6c 20 6b | 69 6c 6f 62 79 74 65 73 |tional k|ilobytes|
|000008c0| 0d 09 79 6f 75 20 77 61 | 6e 74 20 6f 76 65 72 20 |..you wa|nt over |
|000008d0| 74 68 65 20 64 65 66 61 | 75 6c 74 20 73 74 61 63 |the defa|ult stac|
|000008e0| 6b 20 73 69 7a 65 2c 20 | 61 6e 64 20 6d 61 73 74 |k size, |and mast|
|000008f0| 65 72 62 6c 6f 63 6b 73 | 20 69 73 20 74 68 65 20 |erblocks| is the |
|00000900| 6e 75 6d 62 65 72 20 6f | 66 20 6d 61 73 74 65 72 |number o|f master|
|00000910| 0d 09 70 6f 69 6e 74 65 | 72 20 62 6c 6f 63 6b 73 |..pointe|r blocks|
|00000920| 20 74 6f 20 62 65 20 61 | 6c 6c 6f 63 61 74 65 64 | to be a|llocated|
|00000930| 20 2a 2f 0d 4f 53 45 72 | 72 20 4f 70 65 6e 43 53 | */.OSEr|r OpenCS|
|00000940| 41 70 70 28 6c 6f 6e 67 | 20 73 74 61 63 6b 5f 6b |App(long| stack_k|
|00000950| 69 6c 6f 62 79 74 65 73 | 2c 20 6c 6f 6e 67 20 6d |ilobytes|, long m|
|00000960| 61 73 74 65 72 62 6c 6f | 63 6b 73 29 3b 0d 0d 2f |asterblo|cks);../|
|00000970| 2a 20 43 53 41 70 70 45 | 76 65 6e 74 20 64 6f 65 |* CSAppE|vent doe|
|00000980| 73 20 61 6c 6c 20 6f 66 | 20 74 68 65 20 65 76 65 |s all of| the eve|
|00000990| 6e 74 20 68 61 6e 64 6c | 69 6e 67 20 66 6f 72 20 |nt handl|ing for |
|000009a0| 74 68 65 20 65 76 65 6e | 74 20 72 65 63 6f 72 64 |the even|t record|
|000009b0| 20 70 61 72 61 6d 65 74 | 65 72 0d 09 63 61 6c 6c | paramet|er..call|
|000009c0| 69 6e 67 20 61 6e 79 20 | 6f 66 20 74 68 65 20 63 |ing any |of the c|
|000009d0| 61 6c 6c 62 61 63 6b 73 | 20 62 65 6c 6f 77 2e 20 |allbacks| below. |
|000009e0| 20 4e 6f 72 6d 61 6c 6c | 79 2c 20 79 6f 75 20 64 | Normall|y, you d|
|000009f0| 6f 20 6e 6f 74 20 68 61 | 76 65 20 74 6f 20 63 61 |o not ha|ve to ca|
|00000a00| 6c 6c 20 43 53 41 70 70 | 45 76 65 6e 74 0d 09 61 |ll CSApp|Event..a|
|00000a10| 73 20 52 75 6e 43 53 41 | 70 70 20 63 61 6c 6c 73 |s RunCSA|pp calls|
|00000a20| 20 69 74 20 66 6f 72 20 | 79 6f 75 2c 20 68 6f 77 | it for |you, how|
|00000a30| 65 76 65 72 2c 20 69 66 | 20 79 6f 75 20 63 6f 6c |ever, if| you col|
|00000a40| 6c 65 63 74 20 65 76 65 | 6e 74 73 20 79 6f 75 72 |lect eve|nts your|
|00000a50| 73 65 6c 66 20 79 6f 75 | 0d 09 63 61 6e 20 70 61 |self you|..can pa|
|00000a60| 73 73 20 74 68 65 20 65 | 76 65 6e 74 20 72 65 63 |ss the e|vent rec|
|00000a70| 6f 72 64 20 74 6f 20 43 | 53 41 70 70 45 76 65 6e |ord to C|SAppEven|
|00000a80| 74 20 61 66 74 65 72 20 | 79 6f 75 20 61 72 65 20 |t after |you are |
|00000a90| 64 6f 6e 65 20 77 69 74 | 68 20 69 74 2e 20 2a 2f |done wit|h it. */|
|00000aa0| 0d 76 6f 69 64 20 43 53 | 41 70 70 45 76 65 6e 74 |.void CS|AppEvent|
|00000ab0| 28 45 76 65 6e 74 52 65 | 63 6f 72 64 20 2a 65 76 |(EventRe|cord *ev|
|00000ac0| 29 3b 0d 0d 2f 2a 20 52 | 75 6e 43 53 41 70 70 20 |);../* R|unCSApp |
|00000ad0| 63 61 6c 6c 73 20 47 65 | 74 4e 65 78 74 45 76 65 |calls Ge|tNextEve|
|00000ae0| 6e 74 20 6f 72 20 57 61 | 69 74 4e 65 78 74 45 76 |nt or Wa|itNextEv|
|00000af0| 65 6e 74 20 28 64 65 70 | 65 6e 64 69 6e 67 20 6f |ent (dep|ending o|
|00000b00| 6e 20 77 68 61 74 20 69 | 73 20 61 76 61 69 6c 61 |n what i|s availa|
|00000b10| 62 6c 65 29 0d 09 61 6e | 64 20 70 61 73 73 65 73 |ble)..an|d passes|
|00000b20| 20 74 68 65 20 72 65 73 | 75 6c 74 69 6e 67 20 65 | the res|ulting e|
|00000b30| 76 65 6e 74 20 72 65 63 | 6f 72 64 20 74 6f 20 43 |vent rec|ord to C|
|00000b40| 53 41 70 70 45 76 65 6e | 74 2e 20 20 74 68 65 20 |SAppEven|t. the |
|00000b50| 72 65 73 75 6c 74 20 76 | 61 6c 75 65 20 69 73 0d |result v|alue is.|
|00000b60| 09 74 68 65 20 76 61 6c | 75 65 20 72 65 74 75 72 |.the val|ue retur|
|00000b70| 6e 65 64 20 62 79 20 47 | 65 74 4e 65 78 74 45 76 |ned by G|etNextEv|
|00000b80| 65 6e 74 20 6f 72 20 57 | 61 69 74 4e 65 78 74 45 |ent or W|aitNextE|
|00000b90| 76 65 6e 74 2e 20 20 4e | 4f 54 45 3a 20 20 43 53 |vent. N|OTE: CS|
|00000ba0| 41 70 70 45 76 65 6e 74 | 0d 09 69 73 20 63 61 6c |AppEvent|..is cal|
|00000bb0| 6c 65 64 20 66 6f 72 20 | 6e 75 6c 6c 45 76 65 6e |led for |nullEven|
|00000bc0| 74 73 20 74 6f 6f 2e 20 | 2a 2f 0d 42 6f 6f 6c 65 |ts too. |*/.Boole|
|00000bd0| 61 6e 20 52 75 6e 43 53 | 41 70 70 28 6c 6f 6e 67 |an RunCS|App(long|
|00000be0| 20 73 6c 65 65 70 29 3b | 0d 0d 2f 2a 20 43 53 41 | sleep);|../* CSA|
|00000bf0| 70 70 47 65 74 45 76 65 | 6e 74 20 63 61 6c 6c 73 |ppGetEve|nt calls|
|00000c00| 20 65 69 74 68 65 72 20 | 47 65 74 4e 65 78 74 45 | either |GetNextE|
|00000c10| 76 65 6e 74 20 6f 72 20 | 57 61 69 74 4e 65 78 74 |vent or |WaitNext|
|00000c20| 45 76 65 6e 74 20 64 65 | 70 65 6e 64 69 6e 67 20 |Event de|pending |
|00000c30| 6f 6e 20 77 68 61 74 0d | 09 69 73 20 64 65 66 69 |on what.|.is defi|
|00000c40| 6e 65 64 20 70 61 73 73 | 69 6e 67 20 74 68 65 20 |ned pass|ing the |
|00000c50| 65 76 65 6e 74 20 72 65 | 63 6f 72 64 20 74 6f 20 |event re|cord to |
|00000c60| 74 68 65 20 72 6f 75 74 | 69 6e 65 20 61 6e 64 20 |the rout|ine and |
|00000c70| 72 65 74 75 72 6e 73 20 | 74 68 65 20 72 65 73 75 |returns |the resu|
|00000c80| 6c 74 2e 20 0d 09 52 75 | 6e 43 53 41 70 70 20 63 |lt. ..Ru|nCSApp c|
|00000c90| 61 6c 6c 73 20 43 53 41 | 70 70 47 65 74 45 76 65 |alls CSA|ppGetEve|
|00000ca0| 6e 74 20 62 65 66 6f 72 | 65 20 63 61 6c 6c 69 6e |nt befor|e callin|
|00000cb0| 67 20 43 53 41 70 70 45 | 76 65 6e 74 2e 20 20 59 |g CSAppE|vent. Y|
|00000cc0| 6f 75 20 63 61 6e 0d 09 | 63 61 6c 6c 20 43 53 41 |ou can..|call CSA|
|00000cd0| 70 70 47 65 74 45 76 65 | 6e 74 20 61 6e 64 20 43 |ppGetEve|nt and C|
|00000ce0| 53 41 70 70 45 76 65 6e | 74 20 79 6f 75 72 73 65 |SAppEven|t yourse|
|00000cf0| 6c 66 20 69 66 20 79 6f | 75 20 77 61 6e 74 20 74 |lf if yo|u want t|
|00000d00| 6f 20 70 75 74 20 73 6f | 6d 65 20 61 64 64 69 74 |o put so|me addit|
|00000d10| 69 6f 6e 61 6c 0d 09 70 | 72 6f 63 65 73 73 69 6e |ional..p|rocessin|
|00000d20| 67 20 62 65 74 77 65 65 | 6e 20 74 68 65 73 65 20 |g betwee|n these |
|00000d30| 63 61 6c 6c 73 2e 20 20 | 2a 2f 0d 42 6f 6f 6c 65 |calls. |*/.Boole|
|00000d40| 61 6e 20 43 53 41 70 70 | 47 65 74 45 76 65 6e 74 |an CSApp|GetEvent|
|00000d50| 28 45 76 65 6e 74 52 65 | 63 6f 72 64 20 2a 65 76 |(EventRe|cord *ev|
|00000d60| 2c 20 6c 6f 6e 67 20 73 | 6c 65 65 70 29 3b 0d 0d |, long s|leep);..|
|00000d70| 2f 2a 20 43 6c 6f 73 65 | 43 53 41 70 70 20 63 6c |/* Close|CSApp cl|
|00000d80| 6f 73 65 73 20 74 68 65 | 20 61 70 70 6c 69 63 61 |oses the| applica|
|00000d90| 74 69 6f 6e 2e 20 20 50 | 72 65 73 65 6e 74 6c 79 |tion. P|resently|
|00000da0| 2c 20 69 74 20 6f 6e 6c | 79 20 63 61 6c 6c 73 20 |, it onl|y calls |
|00000db0| 45 78 69 74 54 6f 53 68 | 65 6c 6c 28 29 2e 20 54 |ExitToSh|ell(). T|
|00000dc0| 68 69 73 0d 09 72 6f 75 | 74 69 6e 65 20 6e 65 76 |his..rou|tine nev|
|00000dd0| 65 72 20 72 65 74 75 72 | 6e 73 2e 20 2a 2f 0d 76 |er retur|ns. */.v|
|00000de0| 6f 69 64 20 43 6c 6f 73 | 65 43 53 41 70 70 28 76 |oid Clos|eCSApp(v|
|00000df0| 6f 69 64 29 3b 0d 0d 2f | 2a 20 50 52 45 46 45 52 |oid);../|* PREFER|
|00000e00| 45 4e 43 45 53 20 2a 2f | 0d 2f 2a 20 74 68 65 73 |ENCES */|./* thes|
|00000e10| 65 20 72 6f 75 74 69 6e | 65 73 20 73 65 74 20 74 |e routin|es set t|
|00000e20| 68 65 20 72 65 66 65 72 | 65 6e 63 65 20 6e 75 6d |he refer|ence num|
|00000e30| 62 65 72 20 66 6f 72 20 | 74 68 65 20 70 72 65 66 |ber for |the pref|
|00000e40| 65 72 65 6e 63 65 73 20 | 66 69 6c 65 27 73 20 72 |erences |file's r|
|00000e50| 65 73 6f 75 72 63 65 0d | 09 66 6f 72 6b 2e 20 20 |esource.|.fork. |
|00000e60| 2d 31 20 6d 65 61 6e 73 | 20 6e 6f 20 70 72 65 66 |-1 means| no pref|
|00000e70| 65 72 65 6e 63 65 73 20 | 61 72 65 20 73 61 76 65 |erences |are save|
|00000e80| 64 2e 20 2a 2f 0d 76 6f | 69 64 20 53 65 74 43 53 |d. */.vo|id SetCS|
|00000e90| 50 72 65 66 73 46 69 6c | 65 28 73 68 6f 72 74 20 |PrefsFil|e(short |
|00000ea0| 72 65 66 6e 75 6d 29 3b | 0d 73 68 6f 72 74 20 47 |refnum);|.short G|
|00000eb0| 65 74 43 53 50 72 65 66 | 73 46 69 6c 65 28 76 6f |etCSPref|sFile(vo|
|00000ec0| 69 64 29 3b 0d 23 64 65 | 66 69 6e 65 20 6b 4e 55 |id);.#de|fine kNU|
|00000ed0| 4c 4c 50 72 65 66 73 20 | 28 2d 31 29 0d 0d 0d 0d |LLPrefs |(-1)....|
|00000ee0| 2f 2a 20 4d 45 4e 55 20 | 43 4f 4d 4d 41 4e 44 53 |/* MENU |COMMANDS|
|00000ef0| 20 2a 2f 0d 09 0d 2f 2a | 20 4d 65 6e 75 52 65 73 | */.../*| MenuRes|
|00000f00| 65 74 46 75 6e 63 20 69 | 73 20 63 61 6c 6c 65 64 |etFunc i|s called|
|00000f10| 20 6a 75 73 74 20 62 65 | 66 6f 72 65 20 4d 65 6e | just be|fore Men|
|00000f20| 75 53 65 6c 65 63 74 20 | 6f 72 20 4d 65 6e 75 4b |uSelect |or MenuK|
|00000f30| 65 79 20 70 72 6f 76 69 | 64 69 6e 67 20 79 6f 75 |ey provi|ding you|
|00000f40| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 0d 09 61 |r applic|ation..a|
|00000f50| 20 63 68 61 6e 63 65 20 | 74 6f 20 65 6e 61 62 6c | chance |to enabl|
|00000f60| 65 20 74 68 65 20 6d 65 | 6e 75 73 20 63 6f 72 72 |e the me|nus corr|
|00000f70| 65 63 74 6c 79 20 66 6f | 72 20 74 68 65 20 70 72 |ectly fo|r the pr|
|00000f80| 65 73 65 6e 74 20 70 72 | 6f 67 72 61 6d 20 73 74 |esent pr|ogram st|
|00000f90| 61 74 65 2e 20 2a 2f 0d | 74 79 70 65 64 65 66 20 |ate. */.|typedef |
|00000fa0| 76 6f 69 64 20 28 2a 4d | 65 6e 75 52 65 73 65 74 |void (*M|enuReset|
|00000fb0| 46 75 6e 63 29 28 76 6f | 69 64 29 3b 0d 0d 2f 2a |Func)(vo|id);../*|
|00000fc0| 20 4d 65 6e 75 48 61 6e | 64 6c 65 72 46 75 6e 63 | MenuHan|dlerFunc|
|00000fd0| 20 69 73 20 63 61 6c 6c | 65 64 20 61 66 74 65 72 | is call|ed after|
|00000fe0| 20 4d 65 6e 75 53 65 6c | 65 63 74 20 6f 72 20 4d | MenuSel|ect or M|
|00000ff0| 65 6e 75 4b 65 79 20 69 | 66 20 61 20 6d 65 6e 75 |enuKey i|f a menu|
|00001000| 20 73 65 6c 65 63 74 69 | 6f 6e 20 68 61 73 0d 09 | selecti|on has..|
|00001010| 62 65 65 6e 20 6d 61 64 | 65 2e 20 20 6d 65 6e 75 |been mad|e. menu|
|00001020| 20 61 6e 64 20 69 74 65 | 6d 20 77 69 6c 6c 20 64 | and ite|m will d|
|00001030| 65 73 63 72 69 62 65 20 | 74 68 65 20 73 65 6c 65 |escribe |the sele|
|00001040| 63 74 69 6f 6e 2c 20 6d | 6f 64 69 66 69 65 72 73 |ction, m|odifiers|
|00001050| 20 69 73 20 74 68 65 20 | 6d 6f 64 69 66 69 65 72 | is the |modifier|
|00001060| 73 0d 09 66 6c 61 67 73 | 20 66 72 6f 6d 20 74 68 |s..flags| from th|
|00001070| 65 20 65 76 65 6e 74 20 | 72 65 63 6f 72 64 20 61 |e event |record a|
|00001080| 6e 64 20 74 68 65 5f 6d | 65 6e 75 20 69 73 20 61 |nd the_m|enu is a|
|00001090| 20 68 61 6e 64 6c 65 20 | 74 6f 20 74 68 65 20 6d | handle |to the m|
|000010a0| 65 6e 75 2e 20 2a 2f 0d | 74 79 70 65 64 65 66 20 |enu. */.|typedef |
|000010b0| 76 6f 69 64 20 28 2a 4d | 65 6e 75 48 61 6e 64 6c |void (*M|enuHandl|
|000010c0| 65 72 46 75 6e 63 29 28 | 73 68 6f 72 74 20 6d 65 |erFunc)(|short me|
|000010d0| 6e 75 2c 20 73 68 6f 72 | 74 20 69 74 65 6d 2c 20 |nu, shor|t item, |
|000010e0| 73 68 6f 72 74 20 6d 6f | 64 69 66 69 65 72 73 2c |short mo|difiers,|
|000010f0| 20 4d 65 6e 75 48 61 6e | 64 6c 65 20 74 68 65 5f | MenuHan|dle the_|
|00001100| 6d 65 6e 75 29 3b 0d 0d | 0d 2f 2a 20 53 65 74 4d |menu);..|./* SetM|
|00001110| 65 6e 75 46 75 6e 63 74 | 69 6f 6e 73 20 73 65 74 |enuFunct|ions set|
|00001120| 73 20 74 68 65 20 72 65 | 73 65 74 20 61 6e 64 20 |s the re|set and |
|00001130| 68 61 6e 64 6c 65 72 20 | 66 75 6e 63 74 69 6f 6e |handler |function|
|00001140| 20 66 6f 72 20 61 6c 6c | 20 6d 65 6e 75 20 63 6f | for all| menu co|
|00001150| 6d 6d 61 6e 64 73 2e 20 | 20 69 66 20 6d 65 6e 75 |mmands. | if menu|
|00001160| 62 61 72 49 44 0d 09 69 | 73 20 6e 6f 74 20 7a 65 |barID..i|s not ze|
|00001170| 72 6f 2c 20 74 68 65 6e | 20 74 68 65 20 6d 65 6e |ro, then| the men|
|00001180| 75 20 62 61 72 20 69 73 | 20 73 65 74 20 74 6f 20 |u bar is| set to |
|00001190| 74 68 65 20 69 6e 64 69 | 63 61 74 65 64 20 6d 65 |the indi|cated me|
|000011a0| 6e 75 20 62 61 72 20 72 | 65 73 6f 75 72 63 65 20 |nu bar r|esource |
|000011b0| 72 65 61 64 20 66 72 6f | 6d 0d 09 74 68 65 20 61 |read fro|m..the a|
|000011c0| 70 70 6c 69 63 61 74 69 | 6f 6e 27 73 20 72 65 73 |pplicati|on's res|
|000011d0| 6f 75 72 63 65 20 66 6f | 72 6b 2e 20 2a 2f 0d 4f |ource fo|rk. */.O|
|000011e0| 53 45 72 72 20 53 65 74 | 4d 65 6e 75 46 75 6e 63 |SErr Set|MenuFunc|
|000011f0| 74 69 6f 6e 73 28 73 68 | 6f 72 74 20 6d 65 6e 75 |tions(sh|ort menu|
|00001200| 62 61 72 49 44 2c 20 4d | 65 6e 75 52 65 73 65 74 |barID, M|enuReset|
|00001210| 46 75 6e 63 20 72 65 73 | 65 74 2c 20 4d 65 6e 75 |Func res|et, Menu|
|00001220| 48 61 6e 64 6c 65 72 46 | 75 6e 63 20 68 61 6e 64 |HandlerF|unc hand|
|00001230| 6c 65 72 29 3b 0d 0d 0d | 2f 2a 20 6d 70 72 69 6e |ler);...|/* mprin|
|00001240| 74 66 20 73 65 74 73 20 | 74 68 65 20 6d 65 6e 75 |tf sets |the menu|
|00001250| 20 69 74 65 6d 27 73 20 | 74 65 78 74 20 74 6f 20 | item's |text to |
|00001260| 74 68 65 0d 09 73 74 72 | 69 6e 67 20 67 65 6e 65 |the..str|ing gene|
|00001270| 72 61 74 65 64 20 62 79 | 20 66 6d 74 20 61 6e 64 |rated by| fmt and|
|00001280| 20 74 68 65 20 6f 70 74 | 69 6f 6e 61 6c 20 70 61 | the opt|ional pa|
|00001290| 72 61 6d 65 74 65 72 73 | 2e 20 2a 2f 0d 76 6f 69 |rameters|. */.voi|
|000012a0| 64 20 6d 70 72 69 6e 74 | 66 28 4d 65 6e 75 48 61 |d mprint|f(MenuHa|
|000012b0| 6e 64 6c 65 20 74 68 65 | 5f 6d 65 6e 75 2c 20 73 |ndle the|_menu, s|
|000012c0| 68 6f 72 74 20 69 74 65 | 6d 2c 20 63 68 61 72 2a |hort ite|m, char*|
|000012d0| 20 66 6d 74 2c 20 2e 2e | 2e 29 3b 0d 0d 2f 2a 20 | fmt, ..|.);../* |
|000012e0| 53 65 74 4d 65 6e 75 45 | 6e 61 62 6c 65 20 73 65 |SetMenuE|nable se|
|000012f0| 74 73 20 74 68 65 20 6d | 65 6e 75 20 69 74 65 6d |ts the m|enu item|
|00001300| 27 73 20 74 65 78 74 20 | 74 6f 20 74 68 65 0d 09 |'s text |to the..|
|00001310| 73 74 72 69 6e 67 20 67 | 65 6e 65 72 61 74 65 64 |string g|enerated|
|00001320| 20 62 79 20 66 6d 74 20 | 61 6e 64 20 74 68 65 20 | by fmt |and the |
|00001330| 6f 70 74 69 6f 6e 61 6c | 20 70 61 72 61 6d 65 74 |optional| paramet|
|00001340| 65 72 73 2e 20 2a 2f 0d | 76 6f 69 64 20 53 65 74 |ers. */.|void Set|
|00001350| 4d 65 6e 75 45 6e 61 62 | 6c 65 28 4d 65 6e 75 48 |MenuEnab|le(MenuH|
|00001360| 61 6e 64 6c 65 20 74 68 | 65 5f 6d 65 6e 75 2c 20 |andle th|e_menu, |
|00001370| 73 68 6f 72 74 20 69 74 | 65 6d 2c 20 42 6f 6f 6c |short it|em, Bool|
|00001380| 65 61 6e 20 65 6e 61 62 | 6c 65 29 3b 0d 0d 0d 0d |ean enab|le);....|
|00001390| 0d 2f 2a 20 44 49 41 4c | 4f 47 20 43 4f 4d 4d 41 |./* DIAL|OG COMMA|
|000013a0| 4e 44 53 20 2a 2f 0d 0d | 2f 2a 20 6b 44 69 61 6c |NDS */..|/* kDial|
|000013b0| 6f 67 43 6c 6f 73 65 43 | 6f 64 65 20 69 73 20 70 |ogCloseC|ode is p|
|000013c0| 61 73 73 65 64 20 74 6f | 20 79 6f 75 72 20 44 69 |assed to| your Di|
|000013d0| 61 6c 6f 67 48 69 74 46 | 75 6e 63 20 77 68 65 6e |alogHitF|unc when|
|000013e0| 20 74 68 65 20 64 69 61 | 6c 6f 67 20 73 68 6f 75 | the dia|log shou|
|000013f0| 6c 64 20 62 65 20 63 6c | 6f 73 65 64 0d 09 69 65 |ld be cl|osed..ie|
|00001400| 2e 20 65 69 74 68 65 72 | 20 74 68 65 20 67 6f 20 |. either| the go |
|00001410| 61 77 61 79 20 69 74 65 | 6d 20 77 61 73 20 74 72 |away ite|m was tr|
|00001420| 61 63 6b 65 64 20 6f 72 | 20 61 6e 20 65 78 70 6c |acked or| an expl|
|00001430| 69 63 69 74 20 63 61 6c | 6c 20 74 6f 20 43 61 6c |icit cal|l to Cal|
|00001440| 6c 57 69 6e 64 6f 77 43 | 6c 6f 73 65 46 75 6e 63 |lWindowC|loseFunc|
|00001450| 74 69 6f 6e 0d 09 77 61 | 73 20 6d 61 64 65 2e 20 |tion..wa|s made. |
|00001460| 2a 2f 0d 23 64 65 66 69 | 6e 65 20 6b 44 69 61 6c |*/.#defi|ne kDial|
|00001470| 6f 67 43 6c 6f 73 65 43 | 6f 64 65 20 28 2d 32 30 |ogCloseC|ode (-20|
|00001480| 30 31 29 0d 0d 2f 2a 20 | 44 69 61 6c 6f 67 45 76 |01)../* |DialogEv|
|00001490| 65 6e 74 46 75 6e 63 20 | 69 73 20 63 61 6c 6c 65 |entFunc |is calle|
|000014a0| 64 20 66 6f 72 20 64 69 | 61 6c 6f 67 20 77 69 6e |d for di|alog win|
|000014b0| 64 6f 77 73 20 62 65 66 | 6f 72 65 20 49 73 44 69 |dows bef|ore IsDi|
|000014c0| 61 6c 6f 67 45 76 65 6e | 74 20 6f 72 20 44 69 61 |alogEven|t or Dia|
|000014d0| 6c 6f 67 53 65 6c 65 63 | 74 0d 09 69 73 20 63 61 |logSelec|t..is ca|
|000014e0| 6c 6c 65 64 2e 20 20 54 | 68 69 73 20 61 6c 6c 6f |lled. T|his allo|
|000014f0| 77 73 20 79 6f 75 72 20 | 61 70 70 6c 69 63 61 74 |ws your |applicat|
|00001500| 69 6f 6e 20 74 69 6d 65 | 20 74 6f 20 64 6f 20 61 |ion time| to do a|
|00001510| 6e 79 20 73 70 65 63 69 | 61 6c 20 65 76 65 6e 74 |ny speci|al event|
|00001520| 20 66 69 6c 74 65 72 69 | 6e 67 0d 09 72 65 71 75 | filteri|ng..requ|
|00001530| 69 72 65 64 20 66 6f 72 | 20 64 69 61 6c 6f 67 73 |ired for| dialogs|
|00001540| 2e 20 2a 2f 0d 74 79 70 | 65 64 65 66 20 76 6f 69 |. */.typ|edef voi|
|00001550| 64 20 28 2a 44 69 61 6c | 6f 67 45 76 65 6e 74 46 |d (*Dial|ogEventF|
|00001560| 75 6e 63 29 28 44 69 61 | 6c 6f 67 50 74 72 20 64 |unc)(Dia|logPtr d|
|00001570| 69 61 6c 6f 67 2c 20 45 | 76 65 6e 74 52 65 63 6f |ialog, E|ventReco|
|00001580| 72 64 20 2a 65 76 29 3b | 0d 0d 2f 2a 20 44 69 61 |rd *ev);|../* Dia|
|00001590| 6c 6f 67 48 69 74 46 75 | 6e 63 20 69 73 20 63 61 |logHitFu|nc is ca|
|000015a0| 6c 6c 65 64 20 66 6f 72 | 20 64 69 61 6c 6f 67 73 |lled for| dialogs|
|000015b0| 20 77 68 65 6e 65 76 65 | 72 20 44 69 61 6c 6f 67 | wheneve|r Dialog|
|000015c0| 53 65 6c 65 63 74 20 72 | 65 74 75 72 6e 73 20 74 |Select r|eturns t|
|000015d0| 72 75 65 2e 20 20 69 74 | 65 6d 68 69 74 0d 09 69 |rue. it|emhit..i|
|000015e0| 73 20 74 68 65 20 69 74 | 65 6d 20 6e 75 6d 62 65 |s the it|em numbe|
|000015f0| 72 20 72 65 74 75 72 6e | 65 64 20 62 79 20 44 69 |r return|ed by Di|
|00001600| 61 6c 6f 67 53 65 6c 65 | 63 74 2c 20 61 6e 64 20 |alogSele|ct, and |
|00001610| 6d 6f 64 69 66 69 65 72 | 73 20 69 73 20 74 68 65 |modifier|s is the|
|00001620| 20 6d 6f 64 69 66 69 65 | 72 73 0d 09 66 69 65 6c | modifie|rs..fiel|
|00001630| 64 20 63 6f 70 69 65 64 | 20 66 72 6f 6d 20 74 68 |d copied| from th|
|00001640| 65 20 65 76 65 6e 74 20 | 72 65 63 6f 72 64 2e 20 |e event |record. |
|00001650| 2a 2f 0d 74 79 70 65 64 | 65 66 20 76 6f 69 64 20 |*/.typed|ef void |
|00001660| 28 2a 44 69 61 6c 6f 67 | 48 69 74 46 75 6e 63 29 |(*Dialog|HitFunc)|
|00001670| 28 44 69 61 6c 6f 67 50 | 74 72 20 64 69 61 6c 6f |(DialogP|tr dialo|
|00001680| 67 2c 20 73 68 6f 72 74 | 20 69 74 65 6d 68 69 74 |g, short| itemhit|
|00001690| 2c 20 73 68 6f 72 74 20 | 6d 6f 64 69 66 69 65 72 |, short |modifier|
|000016a0| 73 29 3b 0d 0d 2f 2a 20 | 45 64 69 74 44 69 61 6c |s);../* |EditDial|
|000016b0| 6f 67 46 75 6e 63 20 69 | 73 20 63 61 6c 6c 65 64 |ogFunc i|s called|
|000016c0| 20 62 79 20 43 61 6c 6c | 45 64 69 74 43 6f 6d 6d | by Call|EditComm|
|000016d0| 61 6e 64 20 77 68 65 6e | 20 74 68 65 20 66 72 6f |and when| the fro|
|000016e0| 6e 74 6d 6f 73 74 20 77 | 69 6e 64 6f 77 0d 09 69 |ntmost w|indow..i|
|000016f0| 73 20 61 20 64 69 61 6c | 6f 67 20 77 69 6e 64 6f |s a dial|og windo|
|00001700| 77 2e 20 20 46 6f 72 20 | 6d 6f 73 74 20 70 75 72 |w. For |most pur|
|00001710| 70 6f 73 65 73 2c 20 79 | 6f 75 20 73 68 6f 75 6c |poses, y|ou shoul|
|00001720| 64 20 63 61 6c 6c 20 44 | 69 61 6c 6f 67 45 64 69 |d call D|ialogEdi|
|00001730| 74 20 66 72 6f 6d 0d 09 | 79 6f 75 72 20 65 64 69 |t from..|your edi|
|00001740| 74 20 66 75 6e 63 74 69 | 6f 6e 2e 20 2a 2f 0d 74 |t functi|on. */.t|
|00001750| 79 70 65 64 65 66 20 76 | 6f 69 64 20 28 2a 45 64 |ypedef v|oid (*Ed|
|00001760| 69 74 44 69 61 6c 6f 67 | 46 75 6e 63 29 28 44 69 |itDialog|Func)(Di|
|00001770| 61 6c 6f 67 50 74 72 20 | 64 69 61 6c 6f 67 2c 20 |alogPtr |dialog, |
|00001780| 73 68 6f 72 74 20 65 64 | 69 74 63 6d 64 29 3b 0d |short ed|itcmd);.|
|00001790| 0d 0d 2f 2a 20 53 65 74 | 44 69 61 6c 6f 67 46 75 |../* Set|DialogFu|
|000017a0| 6e 63 74 69 6f 6e 73 20 | 73 65 74 73 20 74 68 65 |nctions |sets the|
|000017b0| 20 66 75 6e 63 74 69 6f | 6e 73 20 75 73 65 64 20 | functio|ns used |
|000017c0| 66 6f 72 20 68 61 6e 64 | 6c 69 6e 67 20 64 69 61 |for hand|ling dia|
|000017d0| 6c 6f 67 20 65 76 65 6e | 74 73 2e 20 20 20 49 66 |log even|ts. If|
|000017e0| 20 79 6f 75 0d 09 73 65 | 74 20 74 68 65 20 65 64 | you..se|t the ed|
|000017f0| 69 74 20 70 61 72 61 6d | 65 74 65 72 20 74 6f 20 |it param|eter to |
|00001800| 4e 55 4c 4c 2c 20 74 68 | 65 6e 20 44 69 61 6c 6f |NULL, th|en Dialo|
|00001810| 67 45 64 69 74 20 77 69 | 6c 6c 20 62 65 20 63 61 |gEdit wi|ll be ca|
|00001820| 6c 6c 65 64 20 66 6f 72 | 20 65 64 69 74 20 63 6f |lled for| edit co|
|00001830| 6d 6d 61 6e 64 73 0d 09 | 64 65 73 74 69 6e 65 64 |mmands..|destined|
|00001840| 20 66 6f 72 20 64 69 61 | 6c 6f 67 20 77 69 6e 64 | for dia|log wind|
|00001850| 6f 77 73 2e 20 20 41 6e | 79 20 6f 6e 65 20 6f 72 |ows. An|y one or|
|00001860| 20 61 6c 6c 20 6f 66 20 | 74 68 65 20 70 61 72 61 | all of |the para|
|00001870| 6d 65 74 65 72 73 20 6d | 61 79 20 62 65 20 4e 55 |meters m|ay be NU|
|00001880| 4c 4c 2e 20 20 2a 2f 0d | 76 6f 69 64 20 53 65 74 |LL. */.|void Set|
|00001890| 44 69 61 6c 6f 67 46 75 | 6e 63 74 69 6f 6e 73 28 |DialogFu|nctions(|
|000018a0| 44 69 61 6c 6f 67 45 76 | 65 6e 74 46 75 6e 63 20 |DialogEv|entFunc |
|000018b0| 65 76 74 70 72 6f 63 2c | 20 44 69 61 6c 6f 67 48 |evtproc,| DialogH|
|000018c0| 69 74 46 75 6e 63 20 68 | 69 74 70 72 6f 63 2c 20 |itFunc h|itproc, |
|000018d0| 45 64 69 74 44 69 61 6c | 6f 67 46 75 6e 63 20 65 |EditDial|ogFunc e|
|000018e0| 64 69 74 29 3b 0d 0d 0d | 2f 2a 20 43 61 6c 6c 57 |dit);...|/* CallW|
|000018f0| 69 6e 64 6f 77 43 6c 6f | 73 65 46 75 6e 63 74 69 |indowClo|seFuncti|
|00001900| 6f 6e 20 47 69 76 65 6e | 20 61 20 77 69 6e 64 6f |on Given| a windo|
|00001910| 77 20 70 74 72 2c 20 43 | 61 6c 6c 57 69 6e 64 6f |w ptr, C|allWindo|
|00001920| 77 43 6c 6f 73 65 46 75 | 6e 63 74 69 6f 6e 20 72 |wCloseFu|nction r|
|00001930| 6f 75 74 65 73 20 74 68 | 65 20 63 61 6c 6c 20 74 |outes th|e call t|
|00001940| 6f 0d 09 65 69 74 68 65 | 72 20 74 68 65 20 61 70 |o..eithe|r the ap|
|00001950| 70 72 6f 70 72 69 61 74 | 65 20 64 69 61 6c 6f 67 |propriat|e dialog|
|00001960| 20 68 61 6e 64 6c 65 72 | 20 63 6f 64 65 20 6f 72 | handler| code or|
|00001970| 20 74 68 72 6f 75 67 68 | 20 74 68 65 20 77 69 6e | through| the win|
|00001980| 64 6f 77 20 64 69 73 70 | 61 74 63 68 69 6e 67 20 |dow disp|atching |
|00001990| 63 6f 64 65 0d 09 6e 6f | 74 69 66 79 69 6e 67 20 |code..no|tifying |
|000019a0| 74 68 65 20 77 69 6e 64 | 6f 77 20 74 68 61 74 20 |the wind|ow that |
|000019b0| 69 74 20 73 68 6f 75 6c | 64 20 62 65 20 63 6c 6f |it shoul|d be clo|
|000019c0| 73 65 64 2e 20 20 2a 2f | 0d 76 6f 69 64 20 43 61 |sed. */|.void Ca|
|000019d0| 6c 6c 57 69 6e 64 6f 77 | 43 6c 6f 73 65 46 75 6e |llWindow|CloseFun|
|000019e0| 63 74 69 6f 6e 28 57 69 | 6e 64 6f 77 50 74 72 20 |ction(Wi|ndowPtr |
|000019f0| 77 69 6e 64 6f 77 29 3b | 0d 0d 2f 2a 20 57 49 4e |window);|../* WIN|
|00001a00| 44 4f 57 20 43 4f 4d 4d | 41 4e 44 53 20 2a 2f 0d |DOW COMM|ANDS */.|
|00001a10| 0d 2f 2a 20 43 6c 6f 73 | 65 57 69 6e 64 6f 77 46 |./* Clos|eWindowF|
|00001a20| 75 6e 63 20 69 73 20 63 | 61 6c 6c 65 64 20 77 68 |unc is c|alled wh|
|00001a30| 65 6e 20 54 72 61 63 6b | 47 6f 41 77 61 79 20 72 |en Track|GoAway r|
|00001a40| 65 74 75 72 6e 73 20 74 | 72 75 65 20 66 6f 72 20 |eturns t|rue for |
|00001a50| 61 20 77 69 6e 64 6f 77 | 2e 20 20 2a 2f 0d 74 79 |a window|. */.ty|
|00001a60| 70 65 64 65 66 20 76 6f | 69 64 20 28 2a 43 6c 6f |pedef vo|id (*Clo|
|00001a70| 73 65 57 69 6e 64 6f 77 | 46 75 6e 63 29 28 57 69 |seWindow|Func)(Wi|
|00001a80| 6e 64 6f 77 50 74 72 20 | 77 69 6e 64 6f 77 29 3b |ndowPtr |window);|
|00001a90| 0d 0d 2f 2a 20 47 72 6f | 77 57 69 6e 64 6f 77 46 |../* Gro|wWindowF|
|00001aa0| 75 6e 63 20 69 73 20 63 | 61 6c 6c 65 64 20 77 68 |unc is c|alled wh|
|00001ab0| 65 6e 20 74 68 65 20 46 | 69 6e 64 57 69 6e 64 6f |en the F|indWindo|
|00001ac0| 77 20 72 65 74 75 72 6e | 73 20 74 68 65 20 69 6e |w return|s the in|
|00001ad0| 47 72 6f 77 20 72 65 73 | 75 6c 74 20 63 6f 64 65 |Grow res|ult code|
|00001ae0| 2e 0d 09 77 68 65 72 65 | 20 69 73 20 74 68 65 20 |...where| is the |
|00001af0| 6d 6f 75 73 65 20 70 6f | 73 69 74 69 6f 6e 20 69 |mouse po|sition i|
|00001b00| 6e 20 67 6c 6f 62 61 6c | 20 63 6f 6f 72 64 69 6e |n global| coordin|
|00001b10| 61 74 65 73 2c 20 61 6e | 64 20 6d 6f 64 69 66 69 |ates, an|d modifi|
|00001b20| 65 72 73 20 69 73 20 63 | 6f 70 69 65 64 20 66 72 |ers is c|opied fr|
|00001b30| 6f 6d 0d 09 74 68 65 20 | 65 76 65 6e 74 20 72 65 |om..the |event re|
|00001b40| 63 6f 72 64 27 73 20 6d | 6f 64 69 66 69 65 72 73 |cord's m|odifiers|
|00001b50| 20 66 69 65 6c 64 2e 20 | 2a 2f 0d 74 79 70 65 64 | field. |*/.typed|
|00001b60| 65 66 20 76 6f 69 64 20 | 28 2a 47 72 6f 77 57 69 |ef void |(*GrowWi|
|00001b70| 6e 64 6f 77 46 75 6e 63 | 29 28 57 69 6e 64 6f 77 |ndowFunc|)(Window|
|00001b80| 50 74 72 20 77 69 6e 64 | 6f 77 2c 20 50 6f 69 6e |Ptr wind|ow, Poin|
|00001b90| 74 20 77 68 65 72 65 2c | 20 73 68 6f 72 74 20 6d |t where,| short m|
|00001ba0| 6f 64 69 66 69 65 72 73 | 29 3b 0d 0d 2f 2a 20 5a |odifiers|);../* Z|
|00001bb0| 6f 6f 6d 57 69 6e 64 6f | 77 46 75 6e 63 20 69 73 |oomWindo|wFunc is|
|00001bc0| 20 63 61 6c 6c 65 64 20 | 77 68 65 6e 20 46 69 6e | called |when Fin|
|00001bd0| 64 57 69 6e 64 6f 77 20 | 72 65 74 75 72 6e 73 20 |dWindow |returns |
|00001be0| 69 6e 5a 6f 6f 6d 49 6e | 20 6f 72 20 69 6e 5a 6f |inZoomIn| or inZo|
|00001bf0| 6f 6d 4f 75 74 2e 20 20 | 70 61 72 74 63 6f 64 65 |omOut. |partcode|
|00001c00| 0d 09 69 73 20 65 69 74 | 68 65 72 20 69 6e 5a 6f |..is eit|her inZo|
|00001c10| 6f 6d 49 6e 20 6f 72 20 | 69 6e 5a 6f 6f 6d 4f 75 |omIn or |inZoomOu|
|00001c20| 74 2c 20 61 6e 64 20 6d | 6f 64 69 66 69 65 72 73 |t, and m|odifiers|
|00001c30| 20 69 73 20 63 6f 70 69 | 65 64 20 66 72 6f 6d 20 | is copi|ed from |
|00001c40| 74 68 65 20 65 76 65 6e | 74 20 72 65 63 6f 72 64 |the even|t record|
|00001c50| 27 73 0d 09 6d 6f 64 69 | 66 69 65 72 73 20 66 69 |'s..modi|fiers fi|
|00001c60| 65 6c 64 2e 20 2a 2f 0d | 74 79 70 65 64 65 66 20 |eld. */.|typedef |
|00001c70| 76 6f 69 64 20 28 2a 5a | 6f 6f 6d 57 69 6e 64 6f |void (*Z|oomWindo|
|00001c80| 77 46 75 6e 63 29 28 57 | 69 6e 64 6f 77 50 74 72 |wFunc)(W|indowPtr|
|00001c90| 20 77 69 6e 64 6f 77 2c | 20 73 68 6f 72 74 20 70 | window,| short p|
|00001ca0| 61 72 74 63 6f 64 65 2c | 20 73 68 6f 72 74 20 6d |artcode,| short m|
|00001cb0| 6f 64 69 66 69 65 72 73 | 29 3b 0d 0d 2f 2a 20 43 |odifiers|);../* C|
|00001cc0| 6c 69 63 6b 57 69 6e 64 | 6f 77 46 75 6e 63 20 69 |lickWind|owFunc i|
|00001cd0| 73 20 63 61 6c 6c 65 64 | 20 77 68 65 6e 65 76 65 |s called| wheneve|
|00001ce0| 72 20 61 20 6d 6f 75 73 | 65 64 6f 77 6e 20 6f 63 |r a mous|edown oc|
|00001cf0| 63 75 72 73 20 69 6e 20 | 61 20 77 69 6e 64 6f 77 |curs in |a window|
|00001d00| 27 73 20 63 6f 6e 74 65 | 6e 74 0d 09 61 72 65 61 |'s conte|nt..area|
|00001d10| 2e 20 20 77 68 65 72 65 | 20 69 73 20 74 68 65 20 |. where| is the |
|00001d20| 6d 6f 75 73 65 20 6c 6f | 63 61 74 69 6f 6e 20 69 |mouse lo|cation i|
|00001d30| 6e 20 6c 6f 63 61 6c 20 | 63 6f 6f 72 64 69 6e 61 |n local |coordina|
|00001d40| 74 65 73 2c 20 63 6f 75 | 6e 74 20 69 73 20 74 68 |tes, cou|nt is th|
|00001d50| 65 20 64 6f 75 62 6c 65 | 2d 63 6c 69 63 6b 0d 09 |e double|-click..|
|00001d60| 63 6f 75 6e 74 20 6d 65 | 61 73 75 72 65 64 20 75 |count me|asured u|
|00001d70| 73 69 6e 67 20 47 65 74 | 44 62 6c 54 69 6d 65 20 |sing Get|DblTime |
|00001d80| 61 6e 64 20 6d 6f 64 69 | 66 69 65 72 73 20 69 73 |and modi|fiers is|
|00001d90| 20 63 6f 70 69 65 64 20 | 66 72 6f 6d 20 74 68 65 | copied |from the|
|00001da0| 20 65 76 65 6e 74 20 72 | 65 63 6f 72 64 27 73 0d | event r|ecord's.|
|00001db0| 09 6d 6f 64 69 66 69 65 | 72 73 20 66 69 65 6c 64 |.modifie|rs field|
|00001dc0| 20 2a 2f 0d 74 79 70 65 | 64 65 66 20 76 6f 69 64 | */.type|def void|
|00001dd0| 20 28 2a 43 6c 69 63 6b | 57 69 6e 64 6f 77 46 75 | (*Click|WindowFu|
|00001de0| 6e 63 29 28 57 69 6e 64 | 6f 77 50 74 72 20 77 69 |nc)(Wind|owPtr wi|
|00001df0| 6e 64 6f 77 2c 20 50 6f | 69 6e 74 20 77 68 65 72 |ndow, Po|int wher|
|00001e00| 65 2c 20 73 68 6f 72 74 | 20 63 6f 75 6e 74 2c 20 |e, short| count, |
|00001e10| 73 68 6f 72 74 20 6d 6f | 64 69 66 69 65 72 73 29 |short mo|difiers)|
|00001e20| 3b 0d 0d 2f 2a 20 41 63 | 74 69 76 61 74 65 57 69 |;../* Ac|tivateWi|
|00001e30| 6e 64 6f 77 46 75 6e 63 | 20 69 73 20 63 61 6c 6c |ndowFunc| is call|
|00001e40| 65 64 20 77 68 65 6e 65 | 76 65 72 20 61 20 77 69 |ed whene|ver a wi|
|00001e50| 6e 64 6f 77 20 72 65 63 | 65 69 76 65 73 20 61 6e |ndow rec|eives an|
|00001e60| 20 61 63 74 69 76 61 74 | 65 20 65 76 65 6e 74 2e | activat|e event.|
|00001e70| 20 20 61 63 74 69 76 61 | 74 65 0d 09 69 73 20 74 | activa|te..is t|
|00001e80| 72 75 65 20 69 66 20 74 | 68 65 20 77 69 6e 64 6f |rue if t|he windo|
|00001e90| 77 20 69 73 20 62 65 63 | 6f 6d 69 6e 67 20 61 63 |w is bec|oming ac|
|00001ea0| 74 69 76 65 2e 20 2a 2f | 0d 74 79 70 65 64 65 66 |tive. */|.typedef|
|00001eb0| 20 76 6f 69 64 20 28 2a | 41 63 74 69 76 61 74 65 | void (*|Activate|
|00001ec0| 57 69 6e 64 6f 77 46 75 | 6e 63 29 28 57 69 6e 64 |WindowFu|nc)(Wind|
|00001ed0| 6f 77 50 74 72 20 77 69 | 6e 64 6f 77 2c 20 42 6f |owPtr wi|ndow, Bo|
|00001ee0| 6f 6c 65 61 6e 20 61 63 | 74 69 76 61 74 65 29 3b |olean ac|tivate);|
|00001ef0| 0d 0d 2f 2a 20 55 70 64 | 61 74 65 57 69 6e 64 6f |../* Upd|ateWindo|
|00001f00| 77 46 75 6e 63 20 69 73 | 20 63 61 6c 6c 65 64 20 |wFunc is| called |
|00001f10| 66 6f 72 20 75 70 64 61 | 74 65 20 65 76 65 6e 74 |for upda|te event|
|00001f20| 73 20 64 69 72 65 63 74 | 65 64 20 74 6f 20 61 20 |s direct|ed to a |
|00001f30| 77 69 6e 64 6f 77 2e 20 | 20 79 6f 75 20 6d 75 73 |window. | you mus|
|00001f40| 74 20 63 61 6c 6c 0d 09 | 42 65 67 69 6e 55 70 64 |t call..|BeginUpd|
|00001f50| 61 74 65 20 61 6e 64 20 | 45 6e 64 55 70 64 61 74 |ate and |EndUpdat|
|00001f60| 65 20 79 6f 75 72 73 65 | 6c 66 20 2a 2f 0d 74 79 |e yourse|lf */.ty|
|00001f70| 70 65 64 65 66 20 76 6f | 69 64 20 28 2a 55 70 64 |pedef vo|id (*Upd|
|00001f80| 61 74 65 57 69 6e 64 6f | 77 46 75 6e 63 29 28 57 |ateWindo|wFunc)(W|
|00001f90| 69 6e 64 6f 77 50 74 72 | 20 77 69 6e 64 6f 77 29 |indowPtr| window)|
|00001fa0| 3b 0d 0d 2f 2a 20 45 64 | 69 74 57 69 6e 64 6f 77 |;../* Ed|itWindow|
|00001fb0| 46 75 6e 63 20 69 73 20 | 63 61 6c 6c 65 64 20 62 |Func is |called b|
|00001fc0| 79 20 43 61 6c 6c 45 64 | 69 74 43 6f 6d 6d 61 6e |y CallEd|itComman|
|00001fd0| 64 20 77 68 65 6e 65 76 | 65 72 20 61 20 77 69 6e |d whenev|er a win|
|00001fe0| 64 6f 77 20 69 73 20 66 | 72 6f 6e 74 6d 6f 73 74 |dow is f|rontmost|
|00001ff0| 2e 0d 09 65 64 69 74 63 | 6d 64 20 77 69 6c 6c 20 |...editc|md will |
|00002000| 62 65 20 6f 6e 65 20 6f | 66 20 74 68 65 20 65 64 |be one o|f the ed|
|00002010| 69 74 20 6d 65 6e 75 20 | 69 74 65 6d 73 20 64 65 |it menu |items de|
|00002020| 66 69 6e 65 64 20 61 62 | 6f 76 65 2e 20 20 2a 2f |fined ab|ove. */|
|00002030| 0d 74 79 70 65 64 65 66 | 20 76 6f 69 64 20 28 2a |.typedef| void (*|
|00002040| 45 64 69 74 57 69 6e 64 | 6f 77 46 75 6e 63 29 28 |EditWind|owFunc)(|
|00002050| 57 69 6e 64 6f 77 50 74 | 72 20 77 69 6e 64 6f 77 |WindowPt|r window|
|00002060| 2c 20 73 68 6f 72 74 20 | 65 64 69 74 63 6d 64 29 |, short |editcmd)|
|00002070| 3b 0d 0d 0d 2f 2a 20 53 | 65 74 57 69 6e 64 6f 77 |;.../* S|etWindow|
|00002080| 4d 61 6e 69 70 75 6c 61 | 74 6f 72 73 20 73 65 74 |Manipula|tors set|
|00002090| 73 20 74 68 65 20 77 69 | 6e 64 6f 77 20 63 61 6c |s the wi|ndow cal|
|000020a0| 6c 62 61 63 6b 20 72 6f | 75 74 69 6e 65 73 20 75 |lback ro|utines u|
|000020b0| 73 65 64 20 62 79 20 74 | 68 65 20 61 70 70 6c 69 |sed by t|he appli|
|000020c0| 63 61 74 69 6f 6e 20 66 | 6f 72 0d 09 6d 61 6e 69 |cation f|or..mani|
|000020d0| 70 75 6c 61 74 69 6e 67 | 20 74 68 65 20 77 69 6e |pulating| the win|
|000020e0| 64 6f 77 2e 20 20 41 6e | 79 20 6f 72 20 61 6c 6c |dow. An|y or all|
|000020f0| 20 6f 66 20 74 68 65 20 | 70 61 72 61 6d 65 74 65 | of the |paramete|
|00002100| 72 73 20 6d 61 79 20 62 | 65 20 73 65 74 20 74 6f |rs may b|e set to|
|00002110| 20 4e 55 4c 4c 20 64 65 | 70 65 6e 64 69 6e 67 0d | NULL de|pending.|
|00002120| 09 6f 6e 20 77 68 61 74 | 20 66 75 6e 63 74 69 6f |.on what| functio|
|00002130| 6e 61 6c 69 74 79 20 69 | 73 20 72 65 71 75 69 72 |nality i|s requir|
|00002140| 65 64 2e 20 2a 2f 0d 76 | 6f 69 64 20 53 65 74 57 |ed. */.v|oid SetW|
|00002150| 69 6e 64 6f 77 4d 61 6e | 69 70 75 6c 61 74 6f 72 |indowMan|ipulator|
|00002160| 73 28 43 6c 6f 73 65 57 | 69 6e 64 6f 77 46 75 6e |s(CloseW|indowFun|
|00002170| 63 20 63 6c 6f 73 65 2c | 20 47 72 6f 77 57 69 6e |c close,| GrowWin|
|00002180| 64 6f 77 46 75 6e 63 20 | 67 72 6f 77 2c 20 5a 6f |dowFunc |grow, Zo|
|00002190| 6f 6d 57 69 6e 64 6f 77 | 46 75 6e 63 20 7a 6f 6f |omWindow|Func zoo|
|000021a0| 6d 29 3b 0d 0d 2f 2a 20 | 53 65 74 57 69 6e 64 6f |m);../* |SetWindo|
|000021b0| 77 49 6e 74 65 72 61 63 | 74 69 6f 6e 20 73 65 74 |wInterac|tion set|
|000021c0| 73 20 74 68 65 20 77 69 | 6e 64 6f 77 20 63 61 6c |s the wi|ndow cal|
|000021d0| 6c 62 61 63 6b 20 72 6f | 75 74 69 6e 65 73 20 75 |lback ro|utines u|
|000021e0| 73 65 64 20 62 79 20 74 | 68 65 20 61 70 70 6c 69 |sed by t|he appli|
|000021f0| 63 61 74 69 6f 6e 20 66 | 6f 72 0d 09 69 6e 74 65 |cation f|or..inte|
|00002200| 72 61 63 74 69 6e 67 20 | 77 69 74 68 20 74 68 65 |racting |with the|
|00002210| 20 63 6f 6e 74 65 6e 74 | 73 20 6f 66 20 74 68 65 | content|s of the|
|00002220| 20 77 69 6e 64 6f 77 2e | 20 20 41 6e 79 20 6f 72 | window.| Any or|
|00002230| 20 61 6c 6c 20 6f 66 20 | 74 68 65 20 70 61 72 61 | all of |the para|
|00002240| 6d 65 74 65 72 73 20 6d | 61 79 20 62 65 0d 09 73 |meters m|ay be..s|
|00002250| 65 74 20 74 6f 20 4e 55 | 4c 4c 20 64 65 70 65 6e |et to NU|LL depen|
|00002260| 64 69 6e 67 20 6f 6e 20 | 77 68 61 74 20 66 75 6e |ding on |what fun|
|00002270| 63 74 69 6f 6e 61 6c 69 | 74 79 20 69 73 20 72 65 |ctionali|ty is re|
|00002280| 71 75 69 72 65 64 2e 20 | 2a 2f 0d 76 6f 69 64 20 |quired. |*/.void |
|00002290| 53 65 74 57 69 6e 64 6f | 77 49 6e 74 65 72 61 63 |SetWindo|wInterac|
|000022a0| 74 69 6f 6e 28 43 6c 69 | 63 6b 57 69 6e 64 6f 77 |tion(Cli|ckWindow|
|000022b0| 46 75 6e 63 20 63 6c 69 | 63 6b 2c 20 45 64 69 74 |Func cli|ck, Edit|
|000022c0| 57 69 6e 64 6f 77 46 75 | 6e 63 20 65 64 69 74 29 |WindowFu|nc edit)|
|000022d0| 3b 0d 09 0d 2f 2a 20 53 | 65 74 57 69 6e 64 6f 77 |;.../* S|etWindow|
|000022e0| 52 65 64 72 61 77 20 73 | 65 74 73 20 74 68 65 20 |Redraw s|ets the |
|000022f0| 77 69 6e 64 6f 77 20 63 | 61 6c 6c 62 61 63 6b 20 |window c|allback |
|00002300| 72 6f 75 74 69 6e 65 73 | 20 75 73 65 64 20 62 79 |routines| used by|
|00002310| 20 74 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | the app|lication|
|00002320| 20 66 6f 72 0d 09 64 72 | 61 77 69 6e 67 20 74 68 | for..dr|awing th|
|00002330| 65 20 63 6f 6e 74 65 6e | 74 73 20 6f 66 20 74 68 |e conten|ts of th|
|00002340| 65 20 77 69 6e 64 6f 77 | 2e 20 20 41 6e 79 20 6f |e window|. Any o|
|00002350| 72 20 61 6c 6c 20 6f 66 | 20 74 68 65 20 70 61 72 |r all of| the par|
|00002360| 61 6d 65 74 65 72 73 20 | 6d 61 79 20 62 65 0d 09 |ameters |may be..|
|00002370| 73 65 74 20 74 6f 20 4e | 55 4c 4c 20 64 65 70 65 |set to N|ULL depe|
|00002380| 6e 64 69 6e 67 20 6f 6e | 20 77 68 61 74 20 66 75 |nding on| what fu|
|00002390| 6e 63 74 69 6f 6e 61 6c | 69 74 79 20 69 73 20 72 |nctional|ity is r|
|000023a0| 65 71 75 69 72 65 64 2e | 20 2a 2f 0d 76 6f 69 64 |equired.| */.void|
|000023b0| 20 53 65 74 57 69 6e 64 | 6f 77 52 65 64 72 61 77 | SetWind|owRedraw|
|000023c0| 28 41 63 74 69 76 61 74 | 65 57 69 6e 64 6f 77 46 |(Activat|eWindowF|
|000023d0| 75 6e 63 20 61 63 74 69 | 76 61 74 65 2c 20 55 70 |unc acti|vate, Up|
|000023e0| 64 61 74 65 57 69 6e 64 | 6f 77 46 75 6e 63 20 75 |dateWind|owFunc u|
|000023f0| 70 64 61 74 65 29 3b 0d | 0d 0d 2f 2a 20 53 61 66 |pdate);.|../* Saf|
|00002400| 65 43 6c 6f 73 65 57 69 | 6e 64 6f 77 20 61 6e 64 |eCloseWi|ndow and|
|00002410| 20 53 61 66 65 44 69 73 | 70 6f 73 65 57 69 6e 64 | SafeDis|poseWind|
|00002420| 6f 77 20 61 72 65 20 72 | 65 70 6c 61 63 65 6d 65 |ow are r|eplaceme|
|00002430| 6e 74 73 20 66 6f 72 20 | 74 68 65 20 73 74 61 6e |nts for |the stan|
|00002440| 64 61 72 64 0d 09 43 6c | 6f 73 65 57 69 6e 64 6f |dard..Cl|oseWindo|
|00002450| 77 20 61 6e 64 20 44 69 | 73 70 6f 73 65 57 69 6e |w and Di|sposeWin|
|00002460| 64 6f 77 20 72 6f 75 74 | 69 6e 65 73 2e 20 20 42 |dow rout|ines. B|
|00002470| 65 66 6f 72 65 20 61 20 | 77 69 6e 64 6f 77 20 69 |efore a |window i|
|00002480| 73 20 72 65 6d 6f 76 65 | 64 20 66 72 6f 6d 20 74 |s remove|d from t|
|00002490| 68 65 0d 09 73 63 72 65 | 65 6e 2c 20 69 66 20 69 |he..scre|en, if i|
|000024a0| 74 20 69 73 20 74 68 65 | 20 61 63 74 69 76 65 20 |t is the| active |
|000024b0| 77 69 6e 64 6f 77 2c 20 | 74 68 65 20 41 63 74 69 |window, |the Acti|
|000024c0| 76 61 74 65 57 69 6e 64 | 6f 77 46 75 6e 63 20 69 |vateWind|owFunc i|
|000024d0| 73 20 63 61 6c 6c 65 64 | 20 77 69 74 68 20 61 63 |s called| with ac|
|000024e0| 74 69 76 65 0d 09 73 65 | 74 20 74 6f 20 66 61 6c |tive..se|t to fal|
|000024f0| 73 65 2e 20 2a 2f 0d 76 | 6f 69 64 20 53 61 66 65 |se. */.v|oid Safe|
|00002500| 43 6c 6f 73 65 57 69 6e | 64 6f 77 28 57 69 6e 64 |CloseWin|dow(Wind|
|00002510| 6f 77 50 74 72 20 77 69 | 6e 64 6f 77 29 3b 0d 76 |owPtr wi|ndow);.v|
|00002520| 6f 69 64 20 53 61 66 65 | 44 69 73 70 6f 73 65 57 |oid Safe|DisposeW|
|00002530| 69 6e 64 6f 77 28 57 69 | 6e 64 6f 77 50 74 72 20 |indow(Wi|ndowPtr |
|00002540| 77 69 6e 64 6f 77 29 3b | 0d 0d 2f 2a 20 5a 6f 6f |window);|../* Zoo|
|00002550| 6d 57 69 6e 64 6f 77 54 | 6f 53 69 7a 65 20 7a 6f |mWindowT|oSize zo|
|00002560| 6f 6d 73 20 74 68 65 20 | 77 69 6e 64 6f 77 20 74 |oms the |window t|
|00002570| 6f 20 61 20 70 61 72 74 | 69 63 75 6c 61 72 20 73 |o a part|icular s|
|00002580| 69 7a 65 2e 20 20 4f 6e | 20 6d 75 6c 74 69 70 6c |ize. On| multipl|
|00002590| 65 20 6d 6f 6e 69 74 6f | 72 0d 09 73 79 73 74 65 |e monito|r..syste|
|000025a0| 6d 73 20 74 68 65 20 77 | 69 6e 64 6f 77 20 69 73 |ms the w|indow is|
|000025b0| 20 7a 6f 6f 6d 65 64 20 | 74 6f 20 74 68 65 20 64 | zoomed |to the d|
|000025c0| 69 73 70 6c 61 79 20 69 | 6e 74 65 72 73 65 63 74 |isplay i|ntersect|
|000025d0| 69 6e 67 20 77 69 74 68 | 20 74 68 65 20 6c 61 72 |ing with| the lar|
|000025e0| 67 65 73 74 20 61 72 65 | 61 20 6f 66 0d 09 74 68 |gest are|a of..th|
|000025f0| 65 20 77 69 6e 64 6f 77 | 2e 20 20 2a 2f 0d 76 6f |e window|. */.vo|
|00002600| 69 64 20 5a 6f 6f 6d 57 | 69 6e 64 6f 77 54 6f 53 |id ZoomW|indowToS|
|00002610| 69 7a 65 28 57 69 6e 64 | 6f 77 50 74 72 20 77 69 |ize(Wind|owPtr wi|
|00002620| 6e 64 6f 77 2c 20 73 68 | 6f 72 74 20 77 69 64 74 |ndow, sh|ort widt|
|00002630| 68 2c 20 73 68 6f 72 74 | 20 68 65 69 67 68 74 2c |h, short| height,|
|00002640| 20 73 68 6f 72 74 20 7a | 6f 6f 6d 44 69 72 29 3b | short z|oomDir);|
|00002650| 0d 0d 0d 0d 2f 2a 20 4b | 45 59 42 4f 41 52 44 20 |..../* K|EYBOARD |
|00002660| 49 4e 50 55 54 20 43 4f | 4d 4d 41 4e 44 20 2a 2f |INPUT CO|MMAND */|
|00002670| 0d 0d 2f 2a 20 4b 65 79 | 62 6f 61 72 64 46 75 6e |../* Key|boardFun|
|00002680| 63 20 69 73 20 63 61 6c | 6c 65 64 20 66 6f 72 20 |c is cal|led for |
|00002690| 6b 65 79 62 6f 61 72 64 | 20 65 76 65 6e 74 73 2e |keyboard| events.|
|000026a0| 20 20 6b 65 79 20 77 69 | 6c 6c 20 62 65 20 74 68 | key wi|ll be th|
|000026b0| 65 20 61 73 63 69 69 20 | 63 6f 64 65 0d 09 61 6e |e ascii |code..an|
|000026c0| 64 20 65 76 20 69 73 20 | 74 68 65 20 65 76 65 6e |d ev is |the even|
|000026d0| 74 20 72 65 63 6f 72 64 | 2e 20 2a 2f 0d 74 79 70 |t record|. */.typ|
|000026e0| 65 64 65 66 20 76 6f 69 | 64 20 28 2a 4b 65 79 62 |edef voi|d (*Keyb|
|000026f0| 6f 61 72 64 46 75 6e 63 | 29 28 63 68 61 72 20 6b |oardFunc|)(char k|
|00002700| 65 79 2c 20 45 76 65 6e | 74 52 65 63 6f 72 64 20 |ey, Even|tRecord |
|00002710| 2a 65 76 29 3b 0d 0d 0d | 2f 2a 20 53 65 74 4b 65 |*ev);...|/* SetKe|
|00002720| 79 62 6f 61 72 64 48 6f | 6f 6b 20 73 65 74 73 20 |yboardHo|ok sets |
|00002730| 74 68 65 20 6b 65 79 62 | 6f 61 72 64 20 68 6f 6f |the keyb|oard hoo|
|00002740| 6b 20 66 6f 72 20 74 68 | 65 20 61 70 70 6c 69 63 |k for th|e applic|
|00002750| 61 74 69 6f 6e 2e 20 20 | 69 66 20 6e 6f 20 6b 65 |ation. |if no ke|
|00002760| 79 62 6f 61 72 64 0d 09 | 68 6f 6f 6b 20 69 73 20 |yboard..|hook is |
|00002770| 72 65 71 75 69 72 65 64 | 2c 20 74 68 65 6e 20 79 |required|, then y|
|00002780| 6f 75 20 63 61 6e 20 73 | 65 74 20 74 68 65 20 70 |ou can s|et the p|
|00002790| 61 72 61 6d 65 74 65 72 | 20 74 6f 20 4e 55 4c 4c |arameter| to NULL|
|000027a0| 2e 20 2a 2f 0d 76 6f 69 | 64 20 53 65 74 4b 65 79 |. */.voi|d SetKey|
|000027b0| 62 6f 61 72 64 48 6f 6f | 6b 28 4b 65 79 62 6f 61 |boardHoo|k(Keyboa|
|000027c0| 72 64 46 75 6e 63 20 6b | 65 79 73 29 3b 0d 0d 0d |rdFunc k|eys);...|
|000027d0| 0d 0d 2f 2a 20 4d 49 53 | 43 45 4c 4c 41 4e 45 4f |../* MIS|CELLANEO|
|000027e0| 55 53 20 43 4f 4d 4d 41 | 4e 44 53 20 2a 2f 0d 0d |US COMMA|NDS */..|
|000027f0| 2f 2a 20 44 69 73 6b 49 | 6e 73 65 72 74 46 75 6e |/* DiskI|nsertFun|
|00002800| 63 20 77 69 6c 6c 20 62 | 65 20 63 61 6c 6c 65 64 |c will b|e called|
|00002810| 20 66 6f 72 20 64 69 73 | 6b 20 69 6e 73 65 72 74 | for dis|k insert|
|00002820| 65 64 20 65 76 65 6e 74 | 73 2e 20 2a 2f 0d 74 79 |ed event|s. */.ty|
|00002830| 70 65 64 65 66 20 76 6f | 69 64 20 28 2a 44 69 73 |pedef vo|id (*Dis|
|00002840| 6b 49 6e 73 65 72 74 46 | 75 6e 63 29 28 45 76 65 |kInsertF|unc)(Eve|
|00002850| 6e 74 52 65 63 6f 72 64 | 20 2a 65 76 29 3b 0d 0d |ntRecord| *ev);..|
|00002860| 2f 2a 20 45 76 65 6e 74 | 48 6f 6f 6b 46 75 6e 63 |/* Event|HookFunc|
|00002870| 20 69 73 20 63 61 6c 6c | 65 64 20 61 74 20 74 68 | is call|ed at th|
|00002880| 65 20 62 65 67 69 6e 6e | 69 6e 67 20 6f 66 20 43 |e beginn|ing of C|
|00002890| 53 41 70 70 45 76 65 6e | 74 20 61 6c 6c 6f 77 69 |SAppEven|t allowi|
|000028a0| 6e 67 20 79 6f 75 72 20 | 61 70 70 6c 69 63 61 74 |ng your |applicat|
|000028b0| 69 6f 6e 0d 09 74 6f 20 | 66 69 6c 74 65 72 20 65 |ion..to |filter e|
|000028c0| 76 65 6e 74 73 20 62 65 | 66 6f 72 65 20 74 68 65 |vents be|fore the|
|000028d0| 79 20 61 72 65 20 70 72 | 6f 63 65 73 73 65 64 20 |y are pr|ocessed |
|000028e0| 74 68 72 6f 75 67 68 20 | 74 68 65 20 63 61 6c 6c |through |the call|
|000028f0| 62 61 63 6b 73 2e 20 20 | 69 66 20 74 68 65 20 66 |backs. |if the f|
|00002900| 75 6e 63 74 69 6f 6e 0d | 09 72 65 74 75 72 6e 73 |unction.|.returns|
|00002910| 20 74 72 75 65 2c 20 74 | 68 65 6e 20 6e 6f 20 66 | true, t|hen no f|
|00002920| 75 72 74 68 65 72 20 65 | 76 65 6e 74 20 70 72 6f |urther e|vent pro|
|00002930| 63 65 73 73 69 6e 67 20 | 68 61 70 70 65 6e 73 2c |cessing |happens,|
|00002940| 20 6f 74 68 65 72 77 69 | 73 65 20 74 68 65 20 65 | otherwi|se the e|
|00002950| 76 65 6e 74 20 69 73 0d | 09 70 61 73 73 65 64 20 |vent is.|.passed |
|00002960| 74 68 72 6f 75 67 68 20 | 74 68 65 20 63 61 6c 6c |through |the call|
|00002970| 62 61 63 6b 73 2e 20 20 | 59 6f 75 20 63 61 6e 20 |backs. |You can |
|00002980| 61 6c 73 6f 20 75 73 65 | 20 74 68 69 73 20 72 6f |also use| this ro|
|00002990| 75 74 69 6e 65 20 74 6f | 20 69 6d 70 6c 65 6d 65 |utine to| impleme|
|000029a0| 6e 74 20 63 75 72 73 6f | 72 0d 09 73 77 69 74 63 |nt curso|r..switc|
|000029b0| 68 69 6e 67 2e 20 2a 2f | 0d 74 79 70 65 64 65 66 |hing. */|.typedef|
|000029c0| 20 42 6f 6f 6c 65 61 6e | 20 28 2a 45 76 65 6e 74 | Boolean| (*Event|
|000029d0| 48 6f 6f 6b 46 75 6e 63 | 29 28 45 76 65 6e 74 52 |HookFunc|)(EventR|
|000029e0| 65 63 6f 72 64 20 2a 65 | 76 29 3b 0d 0d 2f 2a 20 |ecord *e|v);../* |
|000029f0| 53 77 69 74 63 68 65 72 | 46 75 6e 63 20 69 73 20 |Switcher|Func is |
|00002a00| 63 61 6c 6c 65 64 20 77 | 68 65 6e 65 76 65 72 20 |called w|henever |
|00002a10| 61 6e 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 73 |an appli|cation s|
|00002a20| 77 69 74 63 68 65 73 20 | 66 72 6f 6d 20 74 68 65 |witches |from the|
|00002a30| 20 66 6f 72 65 67 72 6f | 75 6e 64 20 74 6f 20 74 | foregro|und to t|
|00002a40| 68 65 0d 09 62 61 63 6b | 67 72 6f 75 6e 64 20 6f |he..back|ground o|
|00002a50| 72 20 76 69 73 65 20 76 | 65 72 73 61 2e 20 20 49 |r vise v|ersa. I|
|00002a60| 66 20 73 77 69 74 63 68 | 69 6e 67 5f 69 6e 20 69 |f switch|ing_in i|
|00002a70| 73 20 74 72 75 65 2c 20 | 74 68 65 6e 20 74 68 65 |s true, |then the|
|00002a80| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 69 73 0d | applica|tion is.|
|00002a90| 09 73 77 69 74 63 68 69 | 6e 67 20 69 6e 74 6f 20 |.switchi|ng into |
|00002aa0| 74 68 65 20 66 6f 72 67 | 72 6f 75 6e 64 2e 20 2a |the forg|round. *|
|00002ab0| 2f 0d 74 79 70 65 64 65 | 66 20 76 6f 69 64 20 28 |/.typede|f void (|
|00002ac0| 2a 53 77 69 74 63 68 65 | 72 46 75 6e 63 29 28 42 |*Switche|rFunc)(B|
|00002ad0| 6f 6f 6c 65 61 6e 20 73 | 77 69 74 63 68 69 6e 67 |oolean s|witching|
|00002ae0| 5f 69 6e 29 3b 0d 0d 0d | 2f 2a 20 53 65 74 4d 69 |_in);...|/* SetMi|
|00002af0| 73 63 46 75 6e 63 74 69 | 6f 6e 73 20 73 65 74 73 |scFuncti|ons sets|
|00002b00| 20 74 68 65 20 63 61 6c | 6c 62 61 63 6b 73 20 66 | the cal|lbacks f|
|00002b10| 6f 72 20 74 68 65 20 61 | 62 6f 76 65 20 66 75 6e |or the a|bove fun|
|00002b20| 63 74 69 6f 6e 73 2e 20 | 20 41 6e 79 20 6f 72 20 |ctions. | Any or |
|00002b30| 61 6c 6c 20 6f 66 20 74 | 68 65 0d 09 70 61 72 61 |all of t|he..para|
|00002b40| 6d 65 74 65 72 73 20 6d | 61 79 20 62 65 20 4e 55 |meters m|ay be NU|
|00002b50| 4c 4c 20 64 65 70 65 6e | 64 69 6e 67 20 6f 6e 65 |LL depen|ding one|
|00002b60| 20 77 68 61 74 20 72 6f | 75 74 69 6e 65 73 20 61 | what ro|utines a|
|00002b70| 72 65 20 70 72 6f 76 69 | 64 65 64 2e 20 2a 2f 0d |re provi|ded. */.|
|00002b80| 76 6f 69 64 20 53 65 74 | 4d 69 73 63 46 75 6e 63 |void Set|MiscFunc|
|00002b90| 74 69 6f 6e 73 28 44 69 | 73 6b 49 6e 73 65 72 74 |tions(Di|skInsert|
|00002ba0| 46 75 6e 63 20 64 69 73 | 6b 2c 20 45 76 65 6e 74 |Func dis|k, Event|
|00002bb0| 48 6f 6f 6b 46 75 6e 63 | 20 68 6f 6f 6b 2c 20 53 |HookFunc| hook, S|
|00002bc0| 77 69 74 63 68 65 72 46 | 75 6e 63 20 73 77 69 74 |witcherF|unc swit|
|00002bd0| 63 68 65 72 29 3b 0d 0d | 0d 0d 0d 2f 2a 20 4d 4f |cher);..|.../* MO|
|00002be0| 56 45 41 42 4c 45 20 4d | 4f 44 41 4c 20 57 49 4e |VEABLE M|ODAL WIN|
|00002bf0| 44 4f 57 20 43 4f 4d 4d | 41 4e 44 53 20 2a 2f 0d |DOW COMM|ANDS */.|
|00002c00| 0d 2f 2a 20 4d 4d 48 6f | 6f 6b 46 75 6e 63 20 69 |./* MMHo|okFunc i|
|00002c10| 73 20 63 61 6c 6c 65 64 | 20 77 68 65 6e 65 76 65 |s called| wheneve|
|00002c20| 72 20 74 68 65 20 61 70 | 70 6c 69 63 61 74 69 6f |r the ap|plicatio|
|00002c30| 6e 27 73 20 6d 6f 76 65 | 61 62 6c 65 20 6d 6f 64 |n's move|able mod|
|00002c40| 61 6c 20 64 69 61 6c 6f | 67 0d 09 73 74 61 74 65 |al dialo|g..state|
|00002c50| 20 63 68 61 6e 67 65 73 | 20 66 72 6f 6d 20 6f 6e | changes| from on|
|00002c60| 20 74 6f 20 6f 66 66 2e | 20 20 6d 6d 61 63 74 69 | to off.| mmacti|
|00002c70| 76 65 20 77 69 6c 6c 20 | 62 65 20 74 72 75 65 20 |ve will |be true |
|00002c80| 69 66 20 61 20 6d 6f 76 | 65 61 62 6c 65 20 6d 6f |if a mov|eable mo|
|00002c90| 64 61 6c 0d 09 64 69 61 | 6c 6f 67 20 69 73 20 6e |dal..dia|log is n|
|00002ca0| 6f 77 20 70 72 65 73 65 | 6e 74 20 6f 6e 20 74 68 |ow prese|nt on th|
|00002cb0| 65 20 73 63 72 65 65 6e | 2e 20 20 54 68 69 73 20 |e screen|. This |
|00002cc0| 61 6c 6c 6f 77 73 20 79 | 6f 75 72 20 61 70 70 6c |allows y|our appl|
|00002cd0| 69 63 61 74 69 6f 6e 20 | 74 6f 20 64 69 73 61 62 |ication |to disab|
|00002ce0| 6c 65 0d 09 6d 65 6e 75 | 73 2c 20 65 74 20 63 65 |le..menu|s, et ce|
|00002cf0| 74 65 72 61 2e 20 20 2a | 2f 0d 74 79 70 65 64 65 |tera. *|/.typede|
|00002d00| 66 20 76 6f 69 64 20 28 | 2a 4d 4d 48 6f 6f 6b 46 |f void (|*MMHookF|
|00002d10| 75 6e 63 29 28 42 6f 6f | 6c 65 61 6e 20 6d 6d 61 |unc)(Boo|lean mma|
|00002d20| 63 74 69 76 65 29 3b 20 | 2f 2a 20 63 61 6c 6c 65 |ctive); |/* calle|
|00002d30| 64 20 77 69 74 68 20 6d | 6d 20 73 74 61 74 65 20 |d with m|m state |
|00002d40| 63 68 61 6e 67 65 73 20 | 2a 2f 0d 0d 2f 2a 20 53 |changes |*/../* S|
|00002d50| 65 74 4d 4d 48 6f 6f 6b | 50 72 6f 63 20 73 65 74 |etMMHook|Proc set|
|00002d60| 73 20 74 68 65 20 6d 6f | 76 65 61 62 6c 65 20 6d |s the mo|veable m|
|00002d70| 6f 64 61 6c 20 6d 6f 64 | 65 20 73 77 69 74 63 68 |odal mod|e switch|
|00002d80| 20 68 6f 6f 6b 20 74 68 | 61 74 20 69 73 20 63 61 | hook th|at is ca|
|00002d90| 6c 6c 65 64 20 77 68 65 | 6e 65 76 65 72 0d 09 74 |lled whe|never..t|
|00002da0| 68 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 27 73 |he appli|cation's|
|00002db0| 20 6d 6f 76 65 61 62 6c | 65 20 6d 6f 64 61 6c 20 | moveabl|e modal |
|00002dc0| 73 74 61 74 65 20 73 77 | 69 74 63 68 65 73 20 66 |state sw|itches f|
|00002dd0| 72 6f 6d 20 65 69 74 68 | 65 72 20 6f 6e 20 74 6f |rom eith|er on to|
|00002de0| 20 6f 66 66 20 6f 72 20 | 6f 66 66 20 74 6f 20 6f | off or |off to o|
|00002df0| 6e 2e 20 2a 2f 0d 76 6f | 69 64 20 53 65 74 4d 4d |n. */.vo|id SetMM|
|00002e00| 48 6f 6f 6b 50 72 6f 63 | 28 4d 4d 48 6f 6f 6b 46 |HookProc|(MMHookF|
|00002e10| 75 6e 63 20 6d 6d 68 6f | 6f 6b 29 3b 0d 0d 2f 2a |unc mmho|ok);../*|
|00002e20| 20 47 65 74 4d 4d 57 69 | 6e 64 6f 77 20 72 65 74 | GetMMWi|ndow ret|
|00002e30| 75 72 6e 73 20 61 20 70 | 6f 69 6e 74 65 72 20 74 |urns a p|ointer t|
|00002e40| 6f 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 6d 6f |o the cu|rrent mo|
|00002e50| 76 65 61 62 6c 65 20 6d | 6f 64 61 6c 20 77 69 6e |veable m|odal win|
|00002e60| 64 6f 77 2c 20 6f 72 20 | 4e 55 4c 4c 0d 09 69 66 |dow, or |NULL..if|
|00002e70| 20 74 68 65 72 65 20 69 | 73 20 6e 6f 20 63 75 72 | there i|s no cur|
|00002e80| 72 65 6e 74 20 6d 6f 76 | 65 61 62 6c 65 20 6d 6f |rent mov|eable mo|
|00002e90| 64 61 6c 20 77 69 6e 64 | 6f 77 20 2a 2f 0d 57 69 |dal wind|ow */.Wi|
|00002ea0| 6e 64 6f 77 50 74 72 20 | 47 65 74 4d 4d 57 69 6e |ndowPtr |GetMMWin|
|00002eb0| 64 6f 77 28 76 6f 69 64 | 29 3b 0d 0d 2f 2a 20 53 |dow(void|);../* S|
|00002ec0| 65 74 4d 4d 57 69 6e 64 | 6f 77 20 72 65 74 75 72 |etMMWind|ow retur|
|00002ed0| 6e 73 20 61 20 70 6f 69 | 6e 74 65 72 20 74 6f 20 |ns a poi|nter to |
|00002ee0| 74 68 65 20 6c 61 73 74 | 20 6d 6f 76 65 61 62 6c |the last| moveabl|
|00002ef0| 65 20 6d 6f 64 61 6c 20 | 77 69 6e 64 6f 77 20 61 |e modal |window a|
|00002f00| 6e 64 20 73 65 74 73 20 | 74 68 65 0d 09 6e 65 77 |nd sets |the..new|
|00002f10| 20 6d 6f 76 65 61 62 6c | 65 20 6d 6f 64 61 6c 20 | moveabl|e modal |
|00002f20| 77 69 6e 64 6f 77 20 74 | 6f 20 74 61 72 67 65 74 |window t|o target|
|00002f30| 2e 20 20 79 6f 75 20 63 | 61 6e 20 75 73 65 20 63 |. you c|an use c|
|00002f40| 6f 6d 62 69 6e 61 74 69 | 6f 6e 73 20 6f 66 20 47 |ombinati|ons of G|
|00002f50| 65 74 4d 4d 57 69 6e 64 | 6f 77 0d 09 61 6e 64 20 |etMMWind|ow..and |
|00002f60| 53 65 74 4d 4d 57 69 6e | 64 6f 77 20 74 6f 67 65 |SetMMWin|dow toge|
|00002f70| 74 68 65 72 20 74 6f 20 | 73 61 76 65 20 61 6e 64 |ther to |save and|
|00002f80| 20 72 65 73 74 6f 72 65 | 20 74 68 65 20 4d 4d 20 | restore| the MM |
|00002f90| 73 74 61 74 65 20 61 6e | 64 20 74 68 65 72 65 62 |state an|d thereb|
|00002fa0| 79 20 6e 65 73 74 0d 09 | 6d 6f 76 65 61 62 6c 65 |y nest..|moveable|
|00002fb0| 20 6d 6f 64 61 6c 20 77 | 69 6e 64 6f 77 73 2e 20 | modal w|indows. |
|00002fc0| 2a 2f 0d 57 69 6e 64 6f | 77 50 74 72 20 53 65 74 |*/.Windo|wPtr Set|
|00002fd0| 4d 4d 57 69 6e 64 6f 77 | 28 57 69 6e 64 6f 77 50 |MMWindow|(WindowP|
|00002fe0| 74 72 20 74 61 72 67 65 | 74 29 3b 0d 0d 0d 0d 2f |tr targe|t);..../|
|00002ff0| 2a 20 44 49 41 4c 4f 47 | 20 4d 41 4e 41 47 4d 45 |* DIALOG| MANAGME|
|00003000| 4e 54 20 2a 2f 0d 0d 2f | 2a 20 44 69 61 6c 6f 67 |NT */../|* Dialog|
|00003010| 41 70 70 65 6e 64 49 74 | 65 6d 73 20 61 70 70 65 |AppendIt|ems appe|
|00003020| 6e 64 73 20 74 68 65 20 | 44 49 54 4c 20 72 65 73 |nds the |DITL res|
|00003030| 6f 75 72 63 65 20 69 74 | 65 6d 73 20 74 6f 20 74 |ource it|ems to t|
|00003040| 68 65 20 62 6f 74 74 6f | 6d 20 6f 66 20 74 68 65 |he botto|m of the|
|00003050| 20 64 69 61 6c 6f 67 0d | 09 77 69 6e 64 6f 77 20 | dialog.|.window |
|00003060| 72 65 73 69 7a 69 6e 67 | 20 74 68 65 20 77 69 6e |resizing| the win|
|00003070| 64 6f 77 20 61 73 20 61 | 70 70 72 6f 70 72 69 61 |dow as a|ppropria|
|00003080| 74 65 2e 20 20 2a 66 69 | 72 73 74 5f 69 74 65 6d |te. *fi|rst_item|
|00003090| 20 69 73 20 73 65 74 20 | 74 6f 20 74 68 65 20 69 | is set |to the i|
|000030a0| 6e 64 65 78 0d 09 6f 66 | 20 74 68 65 20 66 69 72 |ndex..of| the fir|
|000030b0| 73 74 20 69 74 65 6d 20 | 61 64 64 65 64 20 74 6f |st item |added to|
|000030c0| 20 74 68 65 20 64 69 61 | 6c 6f 67 2e 20 20 49 66 | the dia|log. If|
|000030d0| 20 74 68 65 20 6e 65 77 | 20 64 69 61 6c 6f 67 20 | the new| dialog |
|000030e0| 72 6f 75 74 69 6e 65 73 | 20 61 72 65 20 70 72 65 |routines| are pre|
|000030f0| 73 65 6e 74 0d 09 74 68 | 65 79 20 61 72 65 20 75 |sent..th|ey are u|
|00003100| 73 65 64 2c 20 6f 74 68 | 65 72 77 69 73 65 20 6f |sed, oth|erwise o|
|00003110| 6c 64 65 72 20 67 6c 75 | 65 20 63 6f 64 65 20 69 |lder glu|e code i|
|00003120| 73 20 75 73 65 64 20 74 | 6f 20 61 70 70 65 6e 64 |s used t|o append|
|00003130| 20 74 68 65 20 69 74 65 | 6d 73 2e 20 20 2a 2f 0d | the ite|ms. */.|
|00003140| 4f 53 45 72 72 20 44 69 | 61 6c 6f 67 41 70 70 65 |OSErr Di|alogAppe|
|00003150| 6e 64 49 74 65 6d 73 28 | 44 69 61 6c 6f 67 50 74 |ndItems(|DialogPt|
|00003160| 72 20 64 69 61 6c 6f 67 | 2c 20 73 68 6f 72 74 20 |r dialog|, short |
|00003170| 69 64 2c 20 73 68 6f 72 | 74 20 2a 66 69 72 73 74 |id, shor|t *first|
|00003180| 5f 69 74 65 6d 29 3b 0d | 0d 2f 2a 20 44 69 61 6c |_item);.|./* Dial|
|00003190| 6f 67 48 69 74 50 72 6f | 63 20 64 65 66 69 6e 65 |ogHitPro|c define|
|000031a0| 73 20 61 20 64 69 61 6c | 6f 67 20 68 69 74 20 70 |s a dial|og hit p|
|000031b0| 72 6f 63 65 64 75 72 65 | 2e 20 20 59 6f 75 72 20 |rocedure|. Your |
|000031c0| 44 69 61 6c 6f 67 48 69 | 74 50 72 6f 63 20 77 69 |DialogHi|tProc wi|
|000031d0| 6c 6c 20 62 65 20 63 61 | 6c 6c 65 64 0d 09 77 68 |ll be ca|lled..wh|
|000031e0| 65 6e 65 76 65 72 20 79 | 6f 75 72 20 64 69 61 6c |enever y|our dial|
|000031f0| 6f 67 20 73 65 6c 65 63 | 74 20 69 6e 64 69 63 61 |og selec|t indica|
|00003200| 74 65 73 20 74 68 61 74 | 20 79 6f 75 72 20 64 69 |tes that| your di|
|00003210| 61 6c 6f 67 20 68 61 73 | 20 62 65 65 6e 20 68 69 |alog has| been hi|
|00003220| 74 2e 20 59 6f 75 20 73 | 68 6f 75 6c 64 0d 09 64 |t. You s|hould..d|
|00003230| 65 73 69 67 6e 20 79 6f | 75 72 20 64 69 61 6c 6f |esign yo|ur dialo|
|00003240| 67 20 73 75 63 68 20 74 | 68 61 74 20 69 74 20 63 |g such t|hat it c|
|00003250| 6c 6f 73 65 73 20 69 74 | 73 65 6c 66 20 77 68 65 |loses it|self whe|
|00003260| 6e 65 76 65 72 20 69 74 | 20 72 65 63 65 69 76 65 |never it| receive|
|00003270| 73 20 61 20 6b 44 69 61 | 6c 6f 67 43 6c 6f 73 65 |s a kDia|logClose|
|00003280| 43 6f 64 65 2e 20 2a 2f | 0d 74 79 70 65 64 65 66 |Code. */|.typedef|
|00003290| 20 76 6f 69 64 20 28 2a | 44 69 61 6c 6f 67 48 69 | void (*|DialogHi|
|000032a0| 74 50 72 6f 63 29 28 44 | 69 61 6c 6f 67 50 74 72 |tProc)(D|ialogPtr|
|000032b0| 20 74 68 65 44 69 61 6c | 6f 67 2c 20 73 68 6f 72 | theDial|og, shor|
|000032c0| 74 20 69 74 65 6d 48 69 | 74 29 3b 0d 0d 2f 2a 20 |t itemHi|t);../* |
|000032d0| 44 69 61 6c 6f 67 45 76 | 65 6e 74 48 6f 6f 6b 20 |DialogEv|entHook |
|000032e0| 64 65 66 69 6e 65 73 20 | 61 20 64 69 61 6c 6f 67 |defines |a dialog|
|000032f0| 20 65 76 65 6e 74 20 68 | 6f 6f 6b 20 70 72 6f 63 | event h|ook proc|
|00003300| 65 64 75 72 65 2e 20 20 | 59 6f 75 20 68 6f 6f 6b |edure. |You hook|
|00003310| 20 70 72 6f 63 65 64 75 | 72 65 20 6d 61 79 20 62 | procedu|re may b|
|00003320| 65 20 63 61 6c 6c 65 64 | 0d 09 42 45 46 4f 52 45 |e called|..BEFORE|
|00003330| 20 49 73 44 69 61 6c 6f | 67 45 76 65 6e 74 2c 20 | IsDialo|gEvent, |
|00003340| 73 6f 20 69 66 20 79 6f | 75 20 77 61 6e 74 20 74 |so if yo|u want t|
|00003350| 6f 20 63 69 72 63 75 6d | 76 65 6e 74 20 69 74 27 |o circum|vent it'|
|00003360| 73 20 62 65 68 61 76 69 | 6f 75 72 2c 20 79 6f 75 |s behavi|our, you|
|00003370| 20 6d 61 79 20 6d 6f 64 | 69 66 79 0d 09 74 68 65 | may mod|ify..the|
|00003380| 20 65 76 65 6e 74 20 72 | 65 63 6f 72 64 2e 20 20 | event r|ecord. |
|00003390| 65 76 65 6e 74 73 20 70 | 61 73 73 65 64 20 74 6f |events p|assed to|
|000033a0| 20 64 69 61 6c 6f 67 20 | 65 76 65 6e 74 20 68 6f | dialog |event ho|
|000033b0| 6f 6b 20 70 72 6f 63 65 | 64 75 72 65 73 20 69 6e |ok proce|dures in|
|000033c0| 63 6c 75 64 65 20 61 63 | 74 69 76 61 74 65 2c 0d |clude ac|tivate,.|
|000033d0| 09 75 70 64 61 74 65 2c | 20 61 6e 64 20 6b 65 79 |.update,| and key|
|000033e0| 64 6f 77 6e 20 65 76 65 | 6e 74 73 2e 20 2a 2f 0d |down eve|nts. */.|
|000033f0| 74 79 70 65 64 65 66 20 | 76 6f 69 64 20 28 2a 44 |typedef |void (*D|
|00003400| 69 61 6c 6f 67 45 76 65 | 6e 74 48 6f 6f 6b 29 28 |ialogEve|ntHook)(|
|00003410| 44 69 61 6c 6f 67 50 74 | 72 20 74 68 65 44 69 61 |DialogPt|r theDia|
|00003420| 6c 6f 67 2c 20 45 76 65 | 6e 74 52 65 63 6f 72 64 |log, Eve|ntRecord|
|00003430| 20 2a 74 68 65 5f 65 76 | 65 6e 74 29 3b 0d 0d 44 | *the_ev|ent);..D|
|00003440| 69 61 6c 6f 67 50 74 72 | 20 4f 70 65 6e 44 69 61 |ialogPtr| OpenDia|
|00003450| 6c 6f 67 57 69 6e 64 6f | 77 28 73 68 6f 72 74 20 |logWindo|w(short |
|00003460| 69 64 2c 20 44 69 61 6c | 6f 67 48 69 74 50 72 6f |id, Dial|ogHitPro|
|00003470| 63 20 68 69 74 70 72 6f | 63 2c 20 44 69 61 6c 6f |c hitpro|c, Dialo|
|00003480| 67 45 76 65 6e 74 48 6f | 6f 6b 20 65 76 65 6e 74 |gEventHo|ok event|
|00003490| 68 6f 6f 6b 29 3b 0d 0d | 2f 2a 20 43 6c 6f 73 65 |hook);..|/* Close|
|000034a0| 44 69 61 6c 6f 67 57 69 | 6e 64 6f 77 20 63 6c 6f |DialogWi|ndow clo|
|000034b0| 73 65 73 20 74 68 65 20 | 64 69 61 6c 6f 67 20 77 |ses the |dialog w|
|000034c0| 69 6e 64 6f 77 2c 20 61 | 6e 64 20 6f 70 74 69 6f |indow, a|nd optio|
|000034d0| 6e 61 6c 6c 79 2c 20 73 | 61 76 65 73 20 69 74 27 |nally, s|aves it'|
|000034e0| 73 20 63 6f 6f 72 64 69 | 6e 61 74 65 73 0d 09 69 |s coordi|nates..i|
|000034f0| 6e 20 74 68 65 20 70 72 | 65 66 65 72 65 6e 63 65 |n the pr|eference|
|00003500| 73 20 66 69 6c 65 2e 20 | 20 63 61 6c 6c 20 43 6c |s file. | call Cl|
|00003510| 6f 73 65 44 69 61 6c 6f | 67 57 69 6e 64 6f 77 20 |oseDialo|gWindow |
|00003520| 66 6f 72 20 62 6f 74 68 | 20 6e 6f 72 6d 61 6c 20 |for both| normal |
|00003530| 61 6e 64 20 6d 75 6c 74 | 69 2d 70 61 6e 65 64 0d |and mult|i-paned.|
|00003540| 09 64 69 61 6c 6f 67 73 | 20 2a 2f 0d 76 6f 69 64 |.dialogs| */.void|
|00003550| 20 43 6c 6f 73 65 44 69 | 61 6c 6f 67 57 69 6e 64 | CloseDi|alogWind|
|00003560| 6f 77 28 44 69 61 6c 6f | 67 50 74 72 20 74 68 65 |ow(Dialo|gPtr the|
|00003570| 44 69 61 6c 6f 67 29 3b | 0d 0d 0d 0d 2f 2a 20 4d |Dialog);|..../* M|
|00003580| 55 4c 54 49 2d 50 41 4e | 45 44 20 44 49 41 4c 4f |ULTI-PAN|ED DIALO|
|00003590| 47 53 20 2a 2f 0d 09 2f | 2a 20 73 70 65 63 69 61 |GS */../|* specia|
|000035a0| 6c 20 69 74 65 6d 48 69 | 74 20 63 6f 64 65 73 20 |l itemHi|t codes |
|000035b0| 70 61 73 73 65 64 20 74 | 6f 20 50 61 6e 65 48 69 |passed t|o PaneHi|
|000035c0| 74 50 72 6f 63 20 70 72 | 6f 63 2e 20 0d 09 09 6b |tProc pr|oc. ...k|
|000035d0| 4f 70 65 6e 50 61 6e 65 | 20 6d 65 61 6e 73 20 74 |OpenPane| means t|
|000035e0| 68 65 20 70 61 6e 65 20 | 68 61 73 20 6a 75 73 74 |he pane |has just|
|000035f0| 20 62 65 65 6e 20 73 77 | 69 74 63 68 65 64 20 69 | been sw|itched i|
|00003600| 6e 20 61 6e 64 20 79 6f | 75 72 20 61 70 70 20 73 |n and yo|ur app s|
|00003610| 68 6f 75 6c 64 20 66 69 | 6c 6c 20 69 6e 20 74 68 |hould fi|ll in th|
|00003620| 65 20 66 69 65 6c 64 73 | 2e 0d 09 09 6b 43 6c 6f |e fields|....kClo|
|00003630| 73 65 50 61 6e 65 20 6d | 65 61 6e 73 20 74 68 65 |sePane m|eans the|
|00003640| 20 70 61 6e 65 20 69 73 | 20 61 62 6f 75 74 20 74 | pane is| about t|
|00003650| 6f 20 62 65 20 73 77 69 | 74 63 68 65 64 20 6f 75 |o be swi|tched ou|
|00003660| 74 0d 09 09 6b 46 6c 75 | 73 68 50 61 6e 65 20 6d |t...kFlu|shPane m|
|00003670| 65 61 6e 73 20 79 6f 75 | 20 73 68 6f 75 6c 64 20 |eans you| should |
|00003680| 73 61 76 65 20 66 69 65 | 6c 64 73 20 69 6e 20 74 |save fie|lds in t|
|00003690| 68 65 20 70 61 6e 65 20 | 74 6f 20 79 6f 75 72 20 |he pane |to your |
|000036a0| 61 70 70 2e 0d 09 2a 2f | 0d 23 64 65 66 69 6e 65 |app...*/|.#define|
|000036b0| 20 6b 4f 70 65 6e 50 61 | 6e 65 20 2d 31 0d 23 64 | kOpenPa|ne -1.#d|
|000036c0| 65 66 69 6e 65 20 6b 43 | 6c 6f 73 65 50 61 6e 65 |efine kC|losePane|
|000036d0| 20 2d 32 0d 23 64 65 66 | 69 6e 65 20 6b 46 6c 75 | -2.#def|ine kFlu|
|000036e0| 73 68 50 61 6e 65 20 2d | 33 0d 0d 2f 2a 20 4e 65 |shPane -|3../* Ne|
|000036f0| 77 4d 75 6c 74 69 50 61 | 6e 65 64 44 69 61 6c 6f |wMultiPa|nedDialo|
|00003700| 67 20 63 72 65 61 74 65 | 73 20 61 20 6e 65 77 20 |g create|s a new |
|00003710| 6d 75 6c 74 69 2d 70 61 | 6e 65 64 20 64 69 61 6c |multi-pa|ned dial|
|00003720| 6f 67 20 75 73 69 6e 67 | 20 74 68 65 20 64 69 61 |og using| the dia|
|00003730| 6c 6f 67 20 77 69 74 68 | 20 74 68 65 20 67 69 76 |log with| the giv|
|00003740| 65 6e 0d 09 72 65 73 6f | 75 72 63 65 20 69 64 2e |en..reso|urce id.|
|00003750| 20 20 68 69 74 70 72 6f | 63 20 61 6e 64 20 65 76 | hitpro|c and ev|
|00003760| 65 6e 74 70 72 6f 63 20 | 61 72 65 20 64 69 61 6c |entproc |are dial|
|00003770| 6f 67 20 70 72 6f 63 65 | 64 75 72 65 73 20 61 73 |og proce|dures as|
|00003780| 20 64 65 66 69 6e 65 64 | 20 61 62 6f 76 65 20 75 | defined| above u|
|00003790| 73 65 64 0d 09 66 6f 72 | 20 68 61 6e 64 6c 69 6e |sed..for| handlin|
|000037a0| 67 20 74 68 65 20 69 74 | 65 6d 73 20 69 6e 20 74 |g the it|ems in t|
|000037b0| 68 65 20 62 61 73 65 20 | 64 69 61 6c 6f 67 20 69 |he base |dialog i|
|000037c0| 74 65 6d 73 20 64 65 74 | 65 72 6d 69 6e 65 64 20 |tems det|ermined |
|000037d0| 62 79 20 74 68 65 20 63 | 6f 6e 74 65 6e 74 73 20 |by the c|ontents |
|000037e0| 6f 66 20 74 68 65 20 69 | 6e 69 74 69 61 6c 0d 09 |of the i|nitial..|
|000037f0| 64 69 61 6c 6f 67 2e 20 | 20 6d 75 6c 74 69 2d 70 |dialog. | multi-p|
|00003800| 61 6e 65 64 20 64 69 61 | 6c 6f 67 73 20 75 73 65 |aned dia|logs use|
|00003810| 20 74 68 65 20 43 54 42 | 20 64 69 61 6c 6f 67 20 | the CTB| dialog |
|00003820| 72 6f 75 74 69 6e 65 73 | 2e 20 20 2a 2f 0d 44 69 |routines|. */.Di|
|00003830| 61 6c 6f 67 50 74 72 20 | 4e 65 77 4d 75 6c 74 69 |alogPtr |NewMulti|
|00003840| 50 61 6e 65 64 44 69 61 | 6c 6f 67 28 73 68 6f 72 |PanedDia|log(shor|
|00003850| 74 20 69 64 2c 20 44 69 | 61 6c 6f 67 48 69 74 50 |t id, Di|alogHitP|
|00003860| 72 6f 63 20 68 69 74 70 | 72 6f 63 2c 20 44 69 61 |roc hitp|roc, Dia|
|00003870| 6c 6f 67 45 76 65 6e 74 | 48 6f 6f 6b 20 65 76 65 |logEvent|Hook eve|
|00003880| 6e 74 68 6f 6f 6b 29 3b | 0d 0d 2f 2a 20 50 61 6e |nthook);|../* Pan|
|00003890| 65 48 69 74 50 72 6f 63 | 20 69 73 20 63 61 6c 6c |eHitProc| is call|
|000038a0| 65 64 20 77 68 65 6e 20 | 61 20 70 61 6e 65 20 69 |ed when |a pane i|
|000038b0| 74 65 6d 20 69 73 20 68 | 69 74 2e 20 20 69 74 65 |tem is h|it. ite|
|000038c0| 6d 48 69 74 20 69 73 20 | 74 68 65 20 64 69 61 6c |mHit is |the dial|
|000038d0| 6f 67 20 69 74 65 6d 20 | 6e 75 6d 62 65 72 0d 09 |og item |number..|
|000038e0| 6f 66 20 74 68 65 20 69 | 74 65 6d 2c 20 7a 65 72 |of the i|tem, zer|
|000038f0| 6f 20 69 74 65 6d 20 69 | 73 20 74 68 65 20 62 61 |o item i|s the ba|
|00003900| 73 65 20 64 69 61 6c 6f | 67 20 69 74 65 6d 20 6e |se dialo|g item n|
|00003910| 75 6d 62 65 72 20 66 6f | 72 20 74 68 65 20 70 61 |umber fo|r the pa|
|00003920| 6e 65 27 73 20 69 74 65 | 6d 2e 0d 09 69 2e 65 2e |ne's ite|m...i.e.|
|00003930| 20 7a 65 72 6f 69 74 65 | 6d 20 2b 20 31 20 3d 3d | zeroite|m + 1 ==|
|00003940| 20 74 68 65 20 66 69 72 | 73 74 20 69 74 65 6d 20 | the fir|st item |
|00003950| 69 6e 20 74 68 65 20 70 | 61 6e 65 27 73 20 69 74 |in the p|ane's it|
|00003960| 65 6d 73 2e 20 2a 2f 0d | 74 79 70 65 64 65 66 20 |ems. */.|typedef |
|00003970| 76 6f 69 64 20 28 2a 50 | 61 6e 65 48 69 74 50 72 |void (*P|aneHitPr|
|00003980| 6f 63 29 28 44 69 61 6c | 6f 67 50 74 72 20 74 68 |oc)(Dial|ogPtr th|
|00003990| 65 44 69 61 6c 6f 67 2c | 20 73 68 6f 72 74 20 7a |eDialog,| short z|
|000039a0| 65 72 6f 69 74 65 6d 2c | 20 73 68 6f 72 74 20 69 |eroitem,| short i|
|000039b0| 74 65 6d 48 69 74 29 3b | 0d 0d 2f 2a 20 50 61 6e |temHit);|../* Pan|
|000039c0| 65 45 76 65 6e 74 48 6f | 6f 6b 20 69 73 20 63 61 |eEventHo|ok is ca|
|000039d0| 6c 6c 65 64 20 77 68 65 | 6e 20 61 20 70 61 6e 65 |lled whe|n a pane|
|000039e0| 20 69 74 65 6d 20 69 73 | 20 63 61 6c 6c 65 64 20 | item is| called |
|000039f0| 66 6f 72 20 65 76 65 6e | 74 20 66 69 6c 74 65 72 |for even|t filter|
|00003a00| 69 6e 67 20 73 70 65 63 | 69 66 69 63 0d 09 74 6f |ing spec|ific..to|
|00003a10| 20 74 68 65 20 61 63 74 | 69 76 65 20 70 61 6e 65 | the act|ive pane|
|00003a20| 2e 20 20 69 74 20 69 73 | 20 63 61 6c 6c 65 64 20 |. it is| called |
|00003a30| 61 66 74 65 72 20 74 68 | 65 20 44 69 61 6c 6f 67 |after th|e Dialog|
|00003a40| 45 76 65 6e 74 48 6f 6f | 6b 20 70 61 73 73 65 64 |EventHoo|k passed|
|00003a50| 20 74 6f 20 4e 65 77 4d | 75 6c 74 69 50 61 6e 65 | to NewM|ultiPane|
|00003a60| 64 44 69 61 6c 6f 67 2e | 20 2a 2f 0d 74 79 70 65 |dDialog.| */.type|
|00003a70| 64 65 66 20 76 6f 69 64 | 20 28 2a 50 61 6e 65 45 |def void| (*PaneE|
|00003a80| 76 65 6e 74 48 6f 6f 6b | 29 28 44 69 61 6c 6f 67 |ventHook|)(Dialog|
|00003a90| 50 74 72 20 74 68 65 44 | 69 61 6c 6f 67 2c 20 73 |Ptr theD|ialog, s|
|00003aa0| 68 6f 72 74 20 7a 65 72 | 6f 69 74 65 6d 2c 20 45 |hort zer|oitem, E|
|00003ab0| 76 65 6e 74 52 65 63 6f | 72 64 20 2a 65 76 29 3b |ventReco|rd *ev);|
|00003ac0| 0d 0d 2f 2a 20 44 69 61 | 6c 6f 67 41 64 64 50 61 |../* Dia|logAddPa|
|00003ad0| 6e 65 20 61 64 64 73 20 | 61 20 6e 65 77 20 64 69 |ne adds |a new di|
|00003ae0| 61 6c 6f 67 20 70 61 6e | 65 20 61 6e 64 20 68 61 |alog pan|e and ha|
|00003af0| 6e 64 6c 65 72 20 70 72 | 6f 63 65 64 75 72 65 73 |ndler pr|ocedures|
|00003b00| 20 74 6f 20 74 68 65 20 | 6d 75 6c 74 69 2d 70 61 | to the |multi-pa|
|00003b10| 6e 65 64 20 64 69 61 6c | 6f 67 2e 0d 09 64 69 61 |ned dial|og...dia|
|00003b20| 6c 6f 67 20 6d 75 73 74 | 20 62 65 20 61 20 64 69 |log must| be a di|
|00003b30| 61 6c 6f 67 20 72 65 74 | 75 72 6e 65 64 20 62 79 |alog ret|urned by|
|00003b40| 20 4e 65 77 4d 75 6c 74 | 69 50 61 6e 65 64 44 69 | NewMult|iPanedDi|
|00003b50| 61 6c 6f 67 2c 20 61 6e | 64 20 64 69 74 6c 20 72 |alog, an|d ditl r|
|00003b60| 65 66 65 72 73 20 74 6f | 20 74 68 65 20 72 65 73 |efers to| the res|
|00003b70| 6f 75 72 63 65 0d 09 69 | 64 20 6f 66 20 74 68 65 |ource..i|d of the|
|00003b80| 20 64 69 61 6c 6f 67 20 | 69 74 65 6d 73 20 6c 69 | dialog |items li|
|00003b90| 73 74 2e 20 2a 2f 0d 76 | 6f 69 64 20 44 69 61 6c |st. */.v|oid Dial|
|00003ba0| 6f 67 41 64 64 50 61 6e | 65 28 44 69 61 6c 6f 67 |ogAddPan|e(Dialog|
|00003bb0| 50 74 72 20 64 69 61 6c | 6f 67 2c 20 73 68 6f 72 |Ptr dial|og, shor|
|00003bc0| 74 20 64 69 74 6c 2c 20 | 50 61 6e 65 48 69 74 50 |t ditl, |PaneHitP|
|00003bd0| 72 6f 63 20 68 69 74 70 | 72 6f 63 2c 20 50 61 6e |roc hitp|roc, Pan|
|00003be0| 65 45 76 65 6e 74 48 6f | 6f 6b 20 65 76 68 6f 6f |eEventHo|ok evhoo|
|00003bf0| 6b 29 3b 0d 0d 2f 2a 20 | 44 69 61 6c 6f 67 53 65 |k);../* |DialogSe|
|00003c00| 74 43 75 72 72 65 6e 74 | 50 61 6e 65 20 73 65 74 |tCurrent|Pane set|
|00003c10| 73 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 70 61 |s the cu|rrent pa|
|00003c20| 6e 65 20 66 6f 72 20 74 | 68 65 20 4d 50 20 64 69 |ne for t|he MP di|
|00003c30| 61 6c 6f 67 20 63 61 6c | 6c 69 6e 67 20 6b 46 6c |alog cal|ling kFl|
|00003c40| 75 73 68 50 61 6e 65 2c | 20 6b 43 6c 6f 73 65 50 |ushPane,| kCloseP|
|00003c50| 61 6e 65 0d 09 66 6f 72 | 20 74 68 65 20 63 75 72 |ane..for| the cur|
|00003c60| 72 65 6e 74 20 70 61 6e | 65 20 61 6e 64 20 6b 4f |rent pan|e and kO|
|00003c70| 70 65 6e 50 61 6e 65 20 | 66 6f 72 20 74 68 65 20 |penPane |for the |
|00003c80| 6e 65 77 20 70 61 6e 65 | 2e 20 20 64 69 74 6c 20 |new pane|. ditl |
|00003c90| 69 73 20 74 68 65 20 69 | 64 20 6e 75 6d 62 65 72 |is the i|d number|
|00003ca0| 20 6f 66 20 61 20 70 61 | 6e 65 0d 09 61 64 64 65 | of a pa|ne..adde|
|00003cb0| 64 20 62 79 20 61 20 63 | 61 6c 6c 20 74 6f 20 44 |d by a c|all to D|
|00003cc0| 69 61 6c 6f 67 41 64 64 | 50 61 6e 65 2e 20 20 57 |ialogAdd|Pane. W|
|00003cd0| 68 65 6e 20 61 20 70 61 | 6e 65 20 69 73 20 73 77 |hen a pa|ne is sw|
|00003ce0| 69 74 63 68 65 64 20 69 | 6e 2c 20 74 68 65 20 68 |itched i|n, the h|
|00003cf0| 65 6c 70 20 62 61 6c 6c | 6f 6f 6e 20 72 65 73 6f |elp ball|oon reso|
|00003d00| 75 72 63 65 2c 20 27 68 | 64 6c 67 27 2c 0d 09 69 |urce, 'h|dlg',..i|
|00003d10| 73 20 73 65 74 20 74 6f | 20 74 68 65 20 6f 6e 65 |s set to| the one|
|00003d20| 20 77 69 74 68 20 74 68 | 65 20 73 61 6d 65 20 49 | with th|e same I|
|00003d30| 44 20 61 73 20 74 68 65 | 20 70 61 6e 65 2e 20 20 |D as the| pane. |
|00003d40| 2a 2f 0d 76 6f 69 64 20 | 44 69 61 6c 6f 67 53 65 |*/.void |DialogSe|
|00003d50| 74 43 75 72 72 65 6e 74 | 50 61 6e 65 28 44 69 61 |tCurrent|Pane(Dia|
|00003d60| 6c 6f 67 50 74 72 20 64 | 69 61 6c 6f 67 2c 20 73 |logPtr d|ialog, s|
|00003d70| 68 6f 72 74 20 64 69 74 | 6c 29 3b 0d 0d 2f 2a 20 |hort dit|l);../* |
|00003d80| 44 69 61 6c 6f 67 47 65 | 74 43 75 72 72 65 6e 74 |DialogGe|tCurrent|
|00003d90| 50 61 6e 65 20 72 65 74 | 75 72 6e 73 20 74 68 65 |Pane ret|urns the|
|00003da0| 20 49 44 20 6e 75 6d 62 | 65 72 20 6f 66 20 74 68 | ID numb|er of th|
|00003db0| 65 20 63 75 72 72 65 6e | 74 20 61 63 74 69 76 65 |e curren|t active|
|00003dc0| 20 70 61 6e 65 2e 20 2a | 2f 0d 73 68 6f 72 74 20 | pane. *|/.short |
|00003dd0| 44 69 61 6c 6f 67 47 65 | 74 43 75 72 72 65 6e 74 |DialogGe|tCurrent|
|00003de0| 50 61 6e 65 28 44 69 61 | 6c 6f 67 50 74 72 20 64 |Pane(Dia|logPtr d|
|00003df0| 69 61 6c 6f 67 29 3b 0d | 0d 2f 2a 20 44 69 61 6c |ialog);.|./* Dial|
|00003e00| 6f 67 46 6c 75 73 68 43 | 75 72 72 65 6e 74 50 61 |ogFlushC|urrentPa|
|00003e10| 6e 65 20 63 61 6c 6c 73 | 20 74 68 65 20 68 69 74 |ne calls| the hit|
|00003e20| 70 72 6f 63 20 66 6f 72 | 20 74 68 65 20 63 75 72 |proc for| the cur|
|00003e30| 72 65 6e 74 20 70 61 6e | 65 20 77 69 74 68 20 74 |rent pan|e with t|
|00003e40| 68 65 20 6b 46 6c 75 73 | 68 50 61 6e 65 20 70 61 |he kFlus|hPane pa|
|00003e50| 72 61 6d 65 74 65 72 0d | 09 73 6f 20 76 61 6c 75 |rameter.|.so valu|
|00003e60| 65 73 20 64 69 73 70 6c | 61 79 65 64 20 61 72 65 |es displ|ayed are|
|00003e70| 20 73 61 76 65 64 20 62 | 61 63 6b 20 74 6f 20 74 | saved b|ack to t|
|00003e80| 68 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 2a |he appli|cation *|
|00003e90| 2f 0d 76 6f 69 64 20 44 | 69 61 6c 6f 67 46 6c 75 |/.void D|ialogFlu|
|00003ea0| 73 68 43 75 72 72 65 6e | 74 50 61 6e 65 28 44 69 |shCurren|tPane(Di|
|00003eb0| 61 6c 6f 67 50 74 72 20 | 64 69 61 6c 6f 67 29 3b |alogPtr |dialog);|
|00003ec0| 0d 0d 0d 2f 2a 20 4d 49 | 53 43 20 44 49 41 4c 4f |.../* MI|SC DIALO|
|00003ed0| 47 20 52 4f 55 54 49 4e | 45 53 20 2a 2f 0d 0d 2f |G ROUTIN|ES */../|
|00003ee0| 2a 20 64 70 72 69 6e 74 | 66 20 73 65 74 73 20 74 |* dprint|f sets t|
|00003ef0| 68 65 20 65 64 69 74 74 | 65 78 74 20 6f 72 20 73 |he editt|ext or s|
|00003f00| 74 61 74 69 63 74 65 78 | 74 20 69 74 65 6d 27 73 |tatictex|t item's|
|00003f10| 20 76 61 6c 75 65 20 74 | 6f 20 74 68 65 0d 09 73 | value t|o the..s|
|00003f20| 74 72 69 6e 67 20 67 65 | 6e 65 72 61 74 65 64 20 |tring ge|nerated |
|00003f30| 62 79 20 66 6d 74 20 61 | 6e 64 20 74 68 65 20 6f |by fmt a|nd the o|
|00003f40| 70 74 69 6f 6e 61 6c 20 | 70 61 72 61 6d 65 74 65 |ptional |paramete|
|00003f50| 72 73 2e 20 2a 2f 0d 76 | 6f 69 64 20 64 70 72 69 |rs. */.v|oid dpri|
|00003f60| 6e 74 66 28 44 69 61 6c | 6f 67 50 74 72 20 64 69 |ntf(Dial|ogPtr di|
|00003f70| 61 6c 6f 67 2c 20 73 68 | 6f 72 74 20 69 74 65 6d |alog, sh|ort item|
|00003f80| 4e 6f 2c 20 63 68 61 72 | 2a 20 66 6d 74 2c 20 2e |No, char|* fmt, .|
|00003f90| 2e 2e 29 3b 0d 0d 2f 2a | 20 61 70 72 69 6e 74 66 |..);../*| aprintf|
|00003fa0| 20 63 61 6c 6c 73 20 50 | 61 72 61 6d 54 65 78 74 | calls P|aramText|
|00003fb0| 20 73 70 65 63 69 66 79 | 69 6e 67 20 74 68 65 20 | specify|ing the |
|00003fc0| 73 74 72 69 6e 67 20 67 | 65 6e 65 72 61 74 65 64 |string g|enerated|
|00003fd0| 0d 09 62 79 20 66 6d 74 | 20 61 6e 64 20 74 68 65 |..by fmt| and the|
|00003fe0| 20 6f 70 74 69 6f 6e 61 | 6c 20 70 61 72 61 6d 65 | optiona|l parame|
|00003ff0| 74 65 72 73 20 62 65 66 | 6f 72 65 20 63 61 6c 6c |ters bef|ore call|
|00004000| 69 6e 67 20 41 6c 65 72 | 74 28 29 0d 09 74 6f 20 |ing Aler|t()..to |
|00004010| 64 69 73 70 6c 61 79 20 | 61 6e 20 61 6c 65 72 74 |display |an alert|
|00004020| 20 62 6f 78 2e 20 2a 2f | 0d 76 6f 69 64 20 61 70 | box. */|.void ap|
|00004030| 72 69 6e 74 66 28 73 68 | 6f 72 74 20 61 6c 65 72 |rintf(sh|ort aler|
|00004040| 74 69 64 2c 20 63 68 61 | 72 20 2a 66 6d 74 2c 20 |tid, cha|r *fmt, |
|00004050| 2e 2e 2e 29 3b 0d 0d 2f | 2a 20 64 67 65 74 74 65 |...);../|* dgette|
|00004060| 78 74 20 72 65 74 72 69 | 65 76 65 73 20 74 68 65 |xt retri|eves the|
|00004070| 20 65 64 69 74 74 65 78 | 74 20 6f 72 20 73 74 61 | edittex|t or sta|
|00004080| 74 69 63 74 65 78 74 20 | 69 74 65 6d 27 73 20 74 |tictext |item's t|
|00004090| 65 78 74 20 72 65 74 75 | 72 6e 69 6e 67 20 73 2e |ext retu|rning s.|
|000040a0| 20 2a 2f 0d 53 74 72 69 | 6e 67 50 74 72 20 64 67 | */.Stri|ngPtr dg|
|000040b0| 65 74 74 65 78 74 28 44 | 69 61 6c 6f 67 50 74 72 |ettext(D|ialogPtr|
|000040c0| 20 64 69 61 6c 6f 67 2c | 20 73 68 6f 72 74 20 69 | dialog,| short i|
|000040d0| 74 65 6d 4e 6f 2c 20 53 | 74 72 32 35 35 20 73 29 |temNo, S|tr255 s)|
|000040e0| 3b 0d 0d 2f 2a 20 46 72 | 61 6d 65 44 4c 42 75 74 |;../* Fr|ameDLBut|
|000040f0| 74 6f 6e 20 64 72 61 77 | 73 20 61 20 73 74 61 6e |ton draw|s a stan|
|00004100| 64 61 72 64 20 73 69 7a | 65 64 20 6b 51 44 47 72 |dard siz|ed kQDGr|
|00004110| 61 66 56 65 72 62 46 72 | 61 6d 65 20 61 72 6f 75 |afVerbFr|ame arou|
|00004120| 6e 64 20 74 68 65 20 69 | 6e 64 69 63 61 74 65 64 |nd the i|ndicated|
|00004130| 0d 09 64 69 61 6c 6f 67 | 20 69 74 65 6d 2e 20 20 |..dialog| item. |
|00004140| 55 73 65 64 20 66 6f 72 | 20 73 70 65 63 69 66 79 |Used for| specify|
|00004150| 69 6e 67 20 74 68 65 20 | 64 65 66 61 75 6c 74 20 |ing the |default |
|00004160| 62 75 74 74 6f 6e 20 2a | 2f 0d 76 6f 69 64 20 46 |button *|/.void F|
|00004170| 72 61 6d 65 44 4c 42 75 | 74 74 6f 6e 28 44 69 61 |rameDLBu|tton(Dia|
|00004180| 6c 6f 67 50 74 72 20 64 | 50 74 72 2c 20 73 68 6f |logPtr d|Ptr, sho|
|00004190| 72 74 20 69 74 65 6d 4e | 6f 29 3b 0d 0d 2f 2a 20 |rt itemN|o);../* |
|000041a0| 48 69 6c 69 74 65 44 4c | 42 75 74 74 6f 6e 20 68 |HiliteDL|Button h|
|000041b0| 69 6c 69 74 65 73 20 74 | 68 65 20 64 69 61 6c 6f |ilites t|he dialo|
|000041c0| 67 20 62 75 74 74 6f 6e | 20 75 73 69 6e 67 20 74 |g button| using t|
|000041d0| 68 65 20 6b 43 6f 6e 74 | 72 6f 6c 42 75 74 74 6f |he kCont|rolButto|
|000041e0| 6e 50 61 72 74 20 68 69 | 6c 69 67 68 74 0d 09 73 |nPart hi|light..s|
|000041f0| 74 61 74 65 2e 20 2a 2f | 0d 76 6f 69 64 20 48 69 |tate. */|.void Hi|
|00004200| 6c 69 74 65 44 4c 42 75 | 74 74 6f 6e 28 44 69 61 |liteDLBu|tton(Dia|
|00004210| 6c 6f 67 50 74 72 20 64 | 69 61 6c 6f 67 2c 20 73 |logPtr d|ialog, s|
|00004220| 68 6f 72 74 20 69 74 65 | 6d 4e 6f 2c 20 42 6f 6f |hort ite|mNo, Boo|
|00004230| 6c 65 61 6e 20 68 69 6c | 69 74 65 29 3b 0d 0d 2f |lean hil|ite);../|
|00004240| 2a 20 53 65 74 44 4c 42 | 75 74 74 6f 6e 56 61 6c |* SetDLB|uttonVal|
|00004250| 75 65 20 73 65 74 73 20 | 61 20 64 69 61 6c 6f 67 |ue sets |a dialog|
|00004260| 20 63 6f 6e 74 72 6f 6c | 20 69 74 65 6d 27 73 20 | control| item's |
|00004270| 76 61 6c 75 65 20 2a 2f | 0d 76 6f 69 64 20 53 65 |value */|.void Se|
|00004280| 74 44 4c 49 74 65 6d 56 | 61 6c 75 65 28 44 69 61 |tDLItemV|alue(Dia|
|00004290| 6c 6f 67 50 74 72 20 64 | 69 61 6c 6f 67 2c 20 73 |logPtr d|ialog, s|
|000042a0| 68 6f 72 74 20 69 74 65 | 6d 4e 6f 2c 20 73 68 6f |hort ite|mNo, sho|
|000042b0| 72 74 20 76 61 6c 75 65 | 29 3b 0d 0d 2f 2a 20 53 |rt value|);../* S|
|000042c0| 65 74 44 4c 42 75 74 74 | 6f 6e 56 61 6c 75 65 20 |etDLButt|onValue |
|000042d0| 73 65 74 73 20 61 20 64 | 69 61 6c 6f 67 20 63 6f |sets a d|ialog co|
|000042e0| 6e 74 72 6f 6c 20 69 74 | 65 6d 27 73 20 76 61 6c |ntrol it|em's val|
|000042f0| 75 65 20 2a 2f 0d 73 68 | 6f 72 74 20 47 65 74 44 |ue */.sh|ort GetD|
|00004300| 4c 49 74 65 6d 56 61 6c | 75 65 28 44 69 61 6c 6f |LItemVal|ue(Dialo|
|00004310| 67 50 74 72 20 64 69 61 | 6c 6f 67 2c 20 73 68 6f |gPtr dia|log, sho|
|00004320| 72 74 20 69 74 65 6d 4e | 6f 29 3b 0d 0d 2f 2a 20 |rt itemN|o);../* |
|00004330| 43 75 72 72 65 6e 74 44 | 69 61 6c 6f 67 45 64 69 |CurrentD|ialogEdi|
|00004340| 74 46 69 65 6c 64 20 72 | 65 74 75 72 6e 73 20 74 |tField r|eturns t|
|00004350| 68 65 20 69 74 65 6d 20 | 6e 75 6d 62 65 72 20 6f |he item |number o|
|00004360| 66 20 74 68 65 20 63 75 | 72 72 65 6e 74 0d 09 61 |f the cu|rrent..a|
|00004370| 63 74 69 76 65 20 74 65 | 78 74 2d 65 64 69 74 20 |ctive te|xt-edit |
|00004380| 69 74 65 6d 20 69 6e 20 | 74 68 65 20 64 69 61 6c |item in |the dial|
|00004390| 6f 67 20 77 69 6e 64 6f | 77 2e 20 2a 2f 0d 73 68 |og windo|w. */.sh|
|000043a0| 6f 72 74 20 43 75 72 72 | 65 6e 74 44 69 61 6c 6f |ort Curr|entDialo|
|000043b0| 67 45 64 69 74 46 69 65 | 6c 64 28 44 69 61 6c 6f |gEditFie|ld(Dialo|
|000043c0| 67 50 74 72 20 64 69 61 | 6c 6f 67 29 3b 0d 0d 2f |gPtr dia|log);../|
|000043d0| 2a 20 47 65 74 44 49 74 | 65 6d 4b 69 6e 64 20 72 |* GetDIt|emKind r|
|000043e0| 65 74 75 72 6e 73 20 74 | 68 65 20 69 74 65 6d 20 |eturns t|he item |
|000043f0| 6b 69 6e 64 20 6f 66 20 | 74 68 65 20 69 6e 64 69 |kind of |the indi|
|00004400| 63 61 74 65 64 20 69 74 | 65 6d 0d 09 69 6e 20 74 |cated it|em..in t|
|00004410| 68 65 20 64 69 61 6c 6f | 67 2e 20 2a 2f 0d 73 68 |he dialo|g. */.sh|
|00004420| 6f 72 74 20 47 65 74 44 | 49 74 65 6d 4b 69 6e 64 |ort GetD|ItemKind|
|00004430| 28 44 69 61 6c 6f 67 50 | 74 72 20 64 69 61 6c 6f |(DialogP|tr dialo|
|00004440| 67 2c 20 73 68 6f 72 74 | 20 69 74 65 6d 4e 6f 29 |g, short| itemNo)|
|00004450| 3b 0d 0d 2f 2a 20 44 69 | 61 6c 6f 67 44 6f 54 61 |;../* Di|alogDoTa|
|00004460| 62 4b 65 79 20 70 65 72 | 66 6f 72 6d 73 20 61 20 |bKey per|forms a |
|00004470| 27 74 61 62 27 20 6f 70 | 65 72 61 74 69 6f 6e 20 |'tab' op|eration |
|00004480| 6d 6f 76 69 6e 67 20 74 | 68 65 20 63 75 72 72 65 |moving t|he curre|
|00004490| 6e 74 0d 09 65 64 69 74 | 20 74 65 78 74 20 73 65 |nt..edit| text se|
|000044a0| 6c 65 63 74 69 6f 6e 20 | 74 6f 20 74 68 65 20 6e |lection |to the n|
|000044b0| 65 78 74 20 65 64 69 74 | 74 65 78 74 20 66 69 65 |ext edit|text fie|
|000044c0| 6c 64 20 69 6e 20 74 68 | 65 20 64 69 61 6c 6f 67 |ld in th|e dialog|
|000044d0| 20 2a 2f 0d 76 6f 69 64 | 20 44 69 61 6c 6f 67 44 | */.void| DialogD|
|000044e0| 6f 54 61 62 4b 65 79 28 | 44 69 61 6c 6f 67 50 74 |oTabKey(|DialogPt|
|000044f0| 72 20 64 69 61 6c 6f 67 | 29 3b 0d 0d 2f 2a 20 53 |r dialog|);../* S|
|00004500| 65 74 44 69 61 6c 6f 67 | 46 6f 6e 74 46 6f 72 6d |etDialog|FontForm|
|00004510| 61 74 20 73 65 74 73 20 | 74 68 65 20 66 6f 6e 74 |at sets |the font|
|00004520| 20 61 6e 64 20 73 74 79 | 6c 65 20 66 6f 72 20 69 | and sty|le for i|
|00004530| 74 65 6d 73 20 69 6e 20 | 74 68 65 20 64 69 61 6c |tems in |the dial|
|00004540| 6f 67 20 2a 2f 0d 76 6f | 69 64 20 53 65 74 44 69 |og */.vo|id SetDi|
|00004550| 61 6c 6f 67 46 6f 6e 74 | 46 6f 72 6d 61 74 28 44 |alogFont|Format(D|
|00004560| 69 61 6c 6f 67 50 74 72 | 20 64 2c 20 73 68 6f 72 |ialogPtr| d, shor|
|00004570| 74 20 66 6f 6e 74 2c 20 | 73 68 6f 72 74 20 73 69 |t font, |short si|
|00004580| 7a 65 2c 20 53 74 79 6c | 65 20 66 61 63 65 29 3b |ze, Styl|e face);|
|00004590| 0d 0d 0d 0d 2f 2a 20 57 | 49 4e 44 4f 57 20 4d 41 |..../* W|INDOW MA|
|000045a0| 4e 41 47 4d 45 4e 54 20 | 2a 2f 0d 0d 2f 2a 20 61 |NAGMENT |*/../* a|
|000045b0| 64 64 69 74 69 6f 6e 61 | 6c 20 66 69 65 6c 64 20 |dditiona|l field |
|000045c0| 66 6f 72 20 77 69 6e 64 | 6f 77 20 6d 65 6e 75 20 |for wind|ow menu |
|000045d0| 70 72 6f 63 65 73 73 69 | 6e 67 20 2a 2f 0d 74 79 |processi|ng */.ty|
|000045e0| 70 65 64 65 66 20 76 6f | 69 64 20 28 2a 4d 65 6e |pedef vo|id (*Men|
|000045f0| 75 57 69 6e 64 6f 77 46 | 75 6e 63 29 28 57 69 6e |uWindowF|unc)(Win|
|00004600| 64 6f 77 50 74 72 20 77 | 69 6e 64 6f 77 2c 20 73 |dowPtr w|indow, s|
|00004610| 68 6f 72 74 20 6d 65 6e | 75 2c 20 73 68 6f 72 74 |hort men|u, short|
|00004620| 20 69 74 65 6d 2c 20 73 | 68 6f 72 74 20 6d 6f 64 | item, s|hort mod|
|00004630| 69 66 69 65 72 73 2c 20 | 4d 65 6e 75 48 61 6e 64 |ifiers, |MenuHand|
|00004640| 6c 65 20 74 68 65 5f 6d | 65 6e 75 29 3b 0d 0d 2f |le the_m|enu);../|
|00004650| 2a 20 66 6f 72 20 69 6e | 71 75 69 72 69 65 73 20 |* for in|quiries |
|00004660| 61 62 6f 75 74 20 70 61 | 72 74 69 63 75 6c 61 72 |about pa|rticular|
|00004670| 20 6d 65 6e 75 20 63 6f | 6d 6d 61 6e 64 73 2e 20 | menu co|mmands. |
|00004680| 20 54 68 65 20 72 6f 75 | 74 69 6e 65 20 73 68 6f | The rou|tine sho|
|00004690| 75 6c 64 20 72 65 74 75 | 72 6e 20 74 72 75 65 20 |uld retu|rn true |
|000046a0| 69 66 20 74 68 65 0d 09 | 69 6e 64 69 63 61 74 65 |if the..|indicate|
|000046b0| 64 20 6d 65 6e 75 20 63 | 6f 6d 6d 61 6e 64 20 69 |d menu c|ommand i|
|000046c0| 73 20 73 75 70 70 6f 72 | 74 65 64 20 62 79 20 74 |s suppor|ted by t|
|000046d0| 68 65 20 77 69 6e 64 6f | 77 2e 20 2a 2f 0d 74 79 |he windo|w. */.ty|
|000046e0| 70 65 64 65 66 20 42 6f | 6f 6c 65 61 6e 20 28 2a |pedef Bo|olean (*|
|000046f0| 57 69 6e 64 6f 77 43 61 | 6e 4d 65 6e 75 46 75 6e |WindowCa|nMenuFun|
|00004700| 63 29 28 57 69 6e 64 6f | 77 50 74 72 20 77 69 6e |c)(Windo|wPtr win|
|00004710| 64 6f 77 2c 20 73 68 6f | 72 74 20 6d 65 6e 75 2c |dow, sho|rt menu,|
|00004720| 20 73 68 6f 72 74 20 69 | 74 65 6d 29 3b 0d 0d 2f | short i|tem);../|
|00004730| 2a 20 61 64 64 69 74 69 | 6f 6e 61 6c 20 66 69 65 |* additi|onal fie|
|00004740| 6c 64 20 66 6f 72 20 6d | 69 73 63 65 6c 61 6e 65 |ld for m|iscelane|
|00004750| 6f 75 73 20 77 69 6e 64 | 6f 77 20 61 63 74 69 6f |ous wind|ow actio|
|00004760| 6e 73 20 2a 2f 0d 74 79 | 70 65 64 65 66 20 76 6f |ns */.ty|pedef vo|
|00004770| 69 64 20 28 2a 4c 69 6e | 6b 57 69 6e 64 6f 77 46 |id (*Lin|kWindowF|
|00004780| 75 6e 63 29 28 57 69 6e | 64 6f 77 50 74 72 20 77 |unc)(Win|dowPtr w|
|00004790| 69 6e 64 6f 77 2c 20 73 | 68 6f 72 74 20 63 73 63 |indow, s|hort csc|
|000047a0| 6f 64 65 2c 20 76 6f 69 | 64 20 2a 63 73 70 61 72 |ode, voi|d *cspar|
|000047b0| 61 6d 29 3b 0d 0d 74 79 | 70 65 64 65 66 20 73 74 |am);..ty|pedef st|
|000047c0| 72 75 63 74 20 57 69 6e | 64 6f 77 44 69 73 70 61 |ruct Win|dowDispa|
|000047d0| 74 63 68 52 65 63 2c 20 | 57 44 69 73 70 61 74 63 |tchRec, |WDispatc|
|000047e0| 68 52 65 63 2c 20 2a 57 | 44 69 73 70 61 74 63 68 |hRec, *W|Dispatch|
|000047f0| 50 74 72 3b 0d 0d 2f 2a | 20 73 65 74 20 75 70 20 |Ptr;../*| set up |
|00004800| 74 68 65 20 66 69 65 6c | 64 73 20 69 6e 20 61 20 |the fiel|ds in a |
|00004810| 77 69 6e 64 6f 77 20 64 | 69 73 70 61 74 63 68 20 |window d|ispatch |
|00004820| 72 65 63 6f 72 64 20 61 | 66 74 65 72 20 63 61 6c |record a|fter cal|
|00004830| 6c 69 6e 67 20 49 6e 69 | 74 57 69 6e 64 6f 77 44 |ling Ini|tWindowD|
|00004840| 69 73 70 61 74 63 68 0d | 09 61 6e 64 20 74 68 65 |ispatch.|.and the|
|00004850| 6e 20 70 61 73 73 20 74 | 68 65 20 72 65 63 6f 72 |n pass t|he recor|
|00004860| 64 20 74 6f 20 52 65 67 | 69 73 74 65 72 57 69 6e |d to Reg|isterWin|
|00004870| 64 6f 77 44 69 73 70 61 | 74 63 68 2e 20 20 4f 6e |dowDispa|tch. On|
|00004880| 63 65 20 74 68 65 20 72 | 65 63 6f 72 64 20 68 61 |ce the r|ecord ha|
|00004890| 73 0d 09 62 65 65 6e 20 | 72 65 67 69 73 74 65 72 |s..been |register|
|000048a0| 65 64 2c 20 74 68 65 20 | 66 75 6e 63 74 69 6f 6e |ed, the |function|
|000048b0| 73 20 69 74 20 63 6f 6e | 74 61 69 6e 73 20 77 69 |s it con|tains wi|
|000048c0| 6c 6c 20 62 65 20 63 61 | 6c 6c 65 64 20 61 75 74 |ll be ca|lled aut|
|000048d0| 6f 6d 61 74 69 63 61 6c | 6c 79 20 66 6f 72 0d 09 |omatical|ly for..|
|000048e0| 77 69 6e 64 6f 77 73 20 | 79 6f 75 20 64 65 66 69 |windows |you defi|
|000048f0| 6e 65 2e 20 2a 2f 0d 73 | 74 72 75 63 74 20 57 69 |ne. */.s|truct Wi|
|00004900| 6e 64 6f 77 44 69 73 70 | 61 74 63 68 52 65 63 20 |ndowDisp|atchRec |
|00004910| 7b 0d 09 57 44 69 73 70 | 61 74 63 68 50 74 72 20 |{..WDisp|atchPtr |
|00004920| 6e 65 78 74 3b 0d 09 73 | 68 6f 72 74 20 77 6b 69 |next;..s|hort wki|
|00004930| 6e 64 3b 0d 09 43 6c 6f | 73 65 57 69 6e 64 6f 77 |nd;..Clo|seWindow|
|00004940| 46 75 6e 63 20 77 63 6c | 6f 73 65 3b 0d 09 47 72 |Func wcl|ose;..Gr|
|00004950| 6f 77 57 69 6e 64 6f 77 | 46 75 6e 63 20 77 67 72 |owWindow|Func wgr|
|00004960| 6f 77 3b 0d 09 5a 6f 6f | 6d 57 69 6e 64 6f 77 46 |ow;..Zoo|mWindowF|
|00004970| 75 6e 63 20 77 7a 6f 6f | 6d 3b 0d 09 43 6c 69 63 |unc wzoo|m;..Clic|
|00004980| 6b 57 69 6e 64 6f 77 46 | 75 6e 63 20 77 63 6c 69 |kWindowF|unc wcli|
|00004990| 63 6b 3b 0d 09 41 63 74 | 69 76 61 74 65 57 69 6e |ck;..Act|ivateWin|
|000049a0| 64 6f 77 46 75 6e 63 20 | 77 61 63 74 69 76 61 74 |dowFunc |wactivat|
|000049b0| 65 3b 0d 09 55 70 64 61 | 74 65 57 69 6e 64 6f 77 |e;..Upda|teWindow|
|000049c0| 46 75 6e 63 20 77 75 70 | 64 61 74 65 3b 0d 09 45 |Func wup|date;..E|
|000049d0| 64 69 74 57 69 6e 64 6f | 77 46 75 6e 63 20 77 65 |ditWindo|wFunc we|
|000049e0| 64 69 74 3b 0d 09 4d 65 | 6e 75 57 69 6e 64 6f 77 |dit;..Me|nuWindow|
|000049f0| 46 75 6e 63 20 77 6d 65 | 6e 75 3b 0d 09 57 69 6e |Func wme|nu;..Win|
|00004a00| 64 6f 77 43 61 6e 4d 65 | 6e 75 46 75 6e 63 20 6d |dowCanMe|nuFunc m|
|00004a10| 63 61 6e 6d 65 6e 75 3b | 0d 09 4c 69 6e 6b 57 69 |canmenu;|..LinkWi|
|00004a20| 6e 64 6f 77 46 75 6e 63 | 20 77 6c 69 6e 6b 3b 0d |ndowFunc| wlink;.|
|00004a30| 7d 3b 0d 0d 2f 2a 20 44 | 69 73 70 61 74 63 68 52 |};../* D|ispatchR|
|00004a40| 65 63 45 78 69 73 74 73 | 20 72 65 74 75 72 6e 73 |ecExists| returns|
|00004a50| 20 74 72 75 65 20 69 66 | 20 61 20 64 69 73 70 61 | true if| a dispa|
|00004a60| 74 63 68 20 72 65 63 6f | 72 64 20 66 6f 72 20 74 |tch reco|rd for t|
|00004a70| 68 65 20 67 69 76 65 6e | 20 77 69 6e 64 6f 77 0d |he given| window.|
|00004a80| 09 6b 69 6e 64 20 68 61 | 73 20 61 6c 72 65 61 64 |.kind ha|s alread|
|00004a90| 79 20 62 65 65 6e 20 64 | 65 66 69 6e 65 64 20 2a |y been d|efined *|
|00004aa0| 2f 0d 42 6f 6f 6c 65 61 | 6e 20 44 69 73 70 61 74 |/.Boolea|n Dispat|
|00004ab0| 63 68 52 65 63 45 78 69 | 73 74 73 28 73 68 6f 72 |chRecExi|sts(shor|
|00004ac0| 74 20 6b 69 6e 64 29 3b | 0d 0d 2f 2a 20 47 65 74 |t kind);|../* Get|
|00004ad0| 55 6e 69 71 75 65 57 4b | 69 6e 64 20 72 65 74 75 |UniqueWK|ind retu|
|00004ae0| 72 6e 73 20 61 20 75 6e | 69 71 75 65 20 77 69 6e |rns a un|ique win|
|00004af0| 64 6f 77 20 6b 69 6e 64 | 20 63 6f 64 65 20 79 6f |dow kind| code yo|
|00004b00| 75 20 63 61 6e 20 75 73 | 65 20 74 6f 20 72 65 67 |u can us|e to reg|
|00004b10| 69 73 74 65 72 0d 09 61 | 20 77 69 6e 64 6f 77 20 |ister..a| window |
|00004b20| 63 6c 61 73 73 2e 20 2a | 2f 0d 73 68 6f 72 74 20 |class. *|/.short |
|00004b30| 47 65 74 55 6e 69 71 75 | 65 57 4b 69 6e 64 28 76 |GetUniqu|eWKind(v|
|00004b40| 6f 69 64 29 3b 0d 0d 2f | 2a 20 49 6e 69 74 57 69 |oid);../|* InitWi|
|00004b50| 6e 64 6f 77 44 69 73 70 | 61 74 63 68 20 69 6e 69 |ndowDisp|atch ini|
|00004b60| 74 69 61 6c 69 7a 65 73 | 20 61 20 77 69 6e 64 6f |tializes| a windo|
|00004b70| 77 20 64 69 73 70 61 74 | 63 68 20 72 65 63 6f 72 |w dispat|ch recor|
|00004b80| 64 20 73 65 74 74 69 6e | 67 20 61 6c 6c 20 6f 66 |d settin|g all of|
|00004b90| 20 74 68 65 20 66 69 65 | 6c 64 73 0d 09 74 6f 20 | the fie|lds..to |
|00004ba0| 7a 65 72 6f 2e 20 20 59 | 6f 75 20 73 68 6f 75 6c |zero. Y|ou shoul|
|00004bb0| 64 20 61 6c 77 61 79 73 | 20 75 73 65 20 74 68 69 |d always| use thi|
|00004bc0| 73 20 72 6f 75 74 69 6e | 65 20 74 6f 20 73 65 74 |s routin|e to set|
|00004bd0| 20 75 70 20 64 69 73 70 | 61 74 63 68 20 72 65 63 | up disp|atch rec|
|00004be0| 6f 72 64 73 20 69 6e 63 | 61 73 65 0d 09 74 68 65 |ords inc|ase..the|
|00004bf0| 20 66 6f 72 6d 61 74 20 | 63 68 61 6e 67 65 73 20 | format |changes |
|00004c00| 69 6e 20 74 68 65 20 66 | 75 74 75 72 65 2e 20 20 |in the f|uture. |
|00004c10| 2a 2f 0d 76 6f 69 64 20 | 49 6e 69 74 57 69 6e 64 |*/.void |InitWind|
|00004c20| 6f 77 44 69 73 70 61 74 | 63 68 28 73 68 6f 72 74 |owDispat|ch(short|
|00004c30| 20 6b 69 6e 64 2c 20 57 | 44 69 73 70 61 74 63 68 | kind, W|Dispatch|
|00004c40| 50 74 72 20 64 69 73 70 | 61 74 63 68 72 65 63 29 |Ptr disp|atchrec)|
|00004c50| 3b 0d 0d 2f 2a 20 52 65 | 67 69 73 74 65 72 57 69 |;../* Re|gisterWi|
|00004c60| 6e 64 6f 77 44 69 73 70 | 61 74 63 68 20 72 65 67 |ndowDisp|atch reg|
|00004c70| 69 73 74 65 72 73 20 74 | 68 65 20 64 69 73 70 61 |isters t|he dispa|
|00004c80| 74 63 68 20 72 65 63 6f | 72 64 20 73 6f 20 69 74 |tch reco|rd so it|
|00004c90| 73 20 72 6f 75 74 69 6e | 65 73 20 77 69 6c 6c 20 |s routin|es will |
|00004ca0| 62 65 20 63 61 6c 6c 65 | 64 0d 09 66 6f 72 20 77 |be calle|d..for w|
|00004cb0| 69 6e 64 6f 77 73 20 77 | 69 74 68 20 74 68 65 20 |indows w|ith the |
|00004cc0| 61 70 70 72 6f 70 72 69 | 61 74 65 20 6b 69 6e 64 |appropri|ate kind|
|00004cd0| 2e 20 20 59 6f 75 20 73 | 68 6f 75 6c 64 20 65 6e |. You s|hould en|
|00004ce0| 73 75 72 65 20 74 68 61 | 74 20 74 68 65 20 73 74 |sure tha|t the st|
|00004cf0| 6f 72 61 67 65 20 6f 63 | 63 75 70 69 65 64 0d 09 |orage oc|cupied..|
|00004d00| 62 79 20 74 68 65 20 64 | 69 73 70 61 74 63 68 20 |by the d|ispatch |
|00004d10| 72 65 63 6f 72 64 20 73 | 75 72 76 69 76 65 73 20 |record s|urvives |
|00004d20| 66 6f 72 20 74 68 65 20 | 64 75 72 61 74 69 6f 6e |for the |duration|
|00004d30| 20 6f 66 20 74 68 65 20 | 61 70 70 6c 69 63 61 74 | of the |applicat|
|00004d40| 69 6f 6e 27 73 20 65 78 | 65 63 75 74 69 6f 6e 2e |ion's ex|ecution.|
|00004d50| 20 2a 2f 0d 76 6f 69 64 | 20 52 65 67 69 73 74 65 | */.void| Registe|
|00004d60| 72 57 69 6e 64 6f 77 44 | 69 73 70 61 74 63 68 28 |rWindowD|ispatch(|
|00004d70| 57 44 69 73 70 61 74 63 | 68 50 74 72 20 64 69 73 |WDispatc|hPtr dis|
|00004d80| 70 61 74 63 68 72 65 63 | 29 3b 0d 0d 2f 2a 20 43 |patchrec|);../* C|
|00004d90| 61 6c 6c 57 69 6e 64 6f | 77 4d 65 6e 75 46 75 6e |allWindo|wMenuFun|
|00004da0| 63 20 63 61 6c 6c 73 20 | 74 68 65 20 77 69 6e 64 |c calls |the wind|
|00004db0| 6f 77 20 6d 65 6e 75 20 | 66 75 6e 63 74 69 6f 6e |ow menu |function|
|00004dc0| 20 66 6f 72 20 74 68 65 | 20 69 6e 64 69 63 61 74 | for the| indicat|
|00004dd0| 65 64 20 77 69 6e 64 6f | 77 20 74 68 72 6f 75 67 |ed windo|w throug|
|00004de0| 68 0d 09 74 68 65 20 64 | 69 73 70 61 74 63 68 69 |h..the d|ispatchi|
|00004df0| 6e 67 20 6d 65 63 68 61 | 6e 69 73 6d 2e 20 2a 2f |ng mecha|nism. */|
|00004e00| 0d 76 6f 69 64 20 43 61 | 6c 6c 57 69 6e 64 6f 77 |.void Ca|llWindow|
|00004e10| 4d 65 6e 75 46 75 6e 63 | 28 57 69 6e 64 6f 77 50 |MenuFunc|(WindowP|
|00004e20| 74 72 20 77 69 6e 64 6f | 77 2c 20 73 68 6f 72 74 |tr windo|w, short|
|00004e30| 20 6d 65 6e 75 2c 20 73 | 68 6f 72 74 20 69 74 65 | menu, s|hort ite|
|00004e40| 6d 2c 20 73 68 6f 72 74 | 20 6d 6f 64 69 66 69 65 |m, short| modifie|
|00004e50| 72 73 2c 20 4d 65 6e 75 | 48 61 6e 64 6c 65 20 74 |rs, Menu|Handle t|
|00004e60| 68 65 5f 6d 65 6e 75 29 | 3b 0d 0d 2f 2a 20 6c 69 |he_menu)|;../* li|
|00004e70| 6e 6b 20 6d 65 73 73 61 | 67 65 73 20 2a 2f 0d 2f |nk messa|ges */./|
|00004e80| 2a 20 63 61 6c 6c 65 64 | 20 61 66 74 65 72 20 61 |* called| after a|
|00004e90| 20 64 72 61 67 2c 20 67 | 72 6f 77 2c 20 6f 72 20 | drag, g|row, or |
|00004ea0| 7a 6f 6f 6d 20 2a 2f 0d | 23 64 65 66 69 6e 65 20 |zoom */.|#define |
|00004eb0| 6b 4c 57 69 6e 64 6f 77 | 4d 6f 76 65 64 20 37 30 |kLWindow|Moved 70|
|00004ec0| 30 30 0d 2f 2a 20 63 61 | 6c 6c 65 64 20 61 66 74 |00./* ca|lled aft|
|00004ed0| 65 72 20 61 20 64 72 61 | 67 2c 20 67 72 6f 77 2c |er a dra|g, grow,|
|00004ee0| 20 6f 72 20 7a 6f 6f 6d | 20 2a 2f 0d 23 64 65 66 | or zoom| */.#def|
|00004ef0| 69 6e 65 20 6b 4c 44 6f | 43 75 72 73 6f 72 20 37 |ine kLDo|Cursor 7|
|00004f00| 30 30 31 0d 0d 2f 2a 20 | 43 61 6c 6c 57 69 6e 64 |001../* |CallWind|
|00004f10| 6f 77 4c 69 6e 6b 46 75 | 6e 63 20 63 61 6c 6c 73 |owLinkFu|nc calls|
|00004f20| 20 74 68 65 20 77 69 6e | 64 6f 77 20 6c 69 6e 6b | the win|dow link|
|00004f30| 69 6e 67 20 66 75 6e 63 | 74 69 6f 6e 20 66 6f 72 |ing func|tion for|
|00004f40| 20 74 68 65 20 69 6e 64 | 69 63 61 74 65 64 20 77 | the ind|icated w|
|00004f50| 69 6e 64 6f 77 20 74 68 | 72 6f 75 67 68 0d 09 74 |indow th|rough..t|
|00004f60| 68 65 20 64 69 73 70 61 | 74 63 68 69 6e 67 20 6d |he dispa|tching m|
|00004f70| 65 63 68 61 6e 69 73 6d | 2e 20 2a 2f 0d 76 6f 69 |echanism|. */.voi|
|00004f80| 64 20 43 61 6c 6c 57 69 | 6e 64 6f 77 4c 69 6e 6b |d CallWi|ndowLink|
|00004f90| 46 75 6e 63 28 57 69 6e | 64 6f 77 50 74 72 20 77 |Func(Win|dowPtr w|
|00004fa0| 69 6e 64 6f 77 2c 20 73 | 68 6f 72 74 20 63 73 63 |indow, s|hort csc|
|00004fb0| 6f 64 65 2c 20 76 6f 69 | 64 20 2a 63 73 70 61 72 |ode, voi|d *cspar|
|00004fc0| 61 6d 29 3b 0d 0d 2f 2a | 20 43 61 6c 6c 57 69 6e |am);../*| CallWin|
|00004fd0| 64 6f 77 43 61 6e 4d 65 | 6e 75 46 75 6e 63 20 63 |dowCanMe|nuFunc c|
|00004fe0| 61 6c 6c 73 20 74 68 65 | 20 77 69 6e 64 6f 77 20 |alls the| window |
|00004ff0| 6d 65 6e 75 20 69 6e 71 | 75 69 72 79 20 66 75 6e |menu inq|uiry fun|
|00005000| 63 74 69 6f 6e 20 66 6f | 72 20 74 68 65 20 69 6e |ction fo|r the in|
|00005010| 64 69 63 61 74 65 64 20 | 77 69 6e 64 6f 77 0d 09 |dicated |window..|
|00005020| 74 68 72 6f 75 67 68 20 | 74 68 65 20 64 69 73 70 |through |the disp|
|00005030| 61 74 63 68 69 6e 67 20 | 6d 65 63 68 61 6e 69 73 |atching |mechanis|
|00005040| 6d 2e 20 59 6f 75 20 63 | 61 6e 20 75 73 65 20 74 |m. You c|an use t|
|00005050| 68 69 73 20 6d 65 63 68 | 61 6e 69 73 6d 20 66 6f |his mech|anism fo|
|00005060| 72 20 65 6e 61 62 6c 69 | 6e 67 20 6d 65 6e 75 73 |r enabli|ng menus|
|00005070| 0d 09 77 69 74 68 6f 75 | 74 20 6d 61 6b 69 6e 67 |..withou|t making|
|00005080| 20 65 78 70 6c 69 63 69 | 74 20 63 61 6c 6c 73 20 | explici|t calls |
|00005090| 74 6f 20 61 6e 79 20 70 | 61 72 74 69 63 75 6c 61 |to any p|articula|
|000050a0| 72 20 75 6e 69 74 2e 20 | 69 74 20 77 69 6c 6c 20 |r unit. |it will |
|000050b0| 72 65 74 75 72 6e 20 66 | 61 6c 73 65 20 69 66 20 |return f|alse if |
|000050c0| 77 69 6e 64 6f 77 0d 09 | 69 73 20 4e 55 4c 4c 2c |window..|is NULL,|
|000050d0| 20 74 68 65 72 65 20 69 | 73 20 6e 6f 20 64 69 73 | there i|s no dis|
|000050e0| 70 61 74 63 68 20 72 65 | 63 6f 72 64 20 66 6f 72 |patch re|cord for|
|000050f0| 20 74 68 61 74 20 6b 69 | 6e 64 20 6f 66 20 77 69 | that ki|nd of wi|
|00005100| 6e 64 6f 77 2c 20 69 66 | 20 74 68 65 20 64 69 73 |ndow, if| the dis|
|00005110| 70 61 74 63 68 20 72 65 | 63 6f 72 64 0d 09 64 6f |patch re|cord..do|
|00005120| 65 73 20 6e 6f 74 20 72 | 65 66 65 72 65 6e 63 65 |es not r|eference|
|00005130| 20 61 20 6d 65 6e 75 20 | 69 6e 71 75 69 72 79 20 | a menu |inquiry |
|00005140| 66 75 6e 63 74 69 6f 6e | 2c 20 6f 72 20 69 66 20 |function|, or if |
|00005150| 74 68 65 20 61 63 74 75 | 61 6c 20 6d 65 6e 75 20 |the actu|al menu |
|00005160| 69 6e 71 75 69 72 79 20 | 66 75 6e 63 74 69 6f 6e |inquiry |function|
|00005170| 0d 09 72 65 74 75 72 6e | 73 20 66 61 6c 73 65 2e |..return|s false.|
|00005180| 20 20 2a 2f 0d 42 6f 6f | 6c 65 61 6e 20 43 61 6c | */.Boo|lean Cal|
|00005190| 6c 57 69 6e 64 6f 77 43 | 61 6e 4d 65 6e 75 46 75 |lWindowC|anMenuFu|
|000051a0| 6e 63 28 57 69 6e 64 6f | 77 50 74 72 20 77 69 6e |nc(Windo|wPtr win|
|000051b0| 64 6f 77 2c 20 73 68 6f | 72 74 20 6d 65 6e 75 2c |dow, sho|rt menu,|
|000051c0| 20 73 68 6f 72 74 20 69 | 74 65 6d 29 3b 0d 0d 23 | short i|tem);..#|
|000051d0| 65 6e 64 69 66 0d 00 00 | 00 00 00 00 00 00 00 00 |endif...|........|
|000051e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005200| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00005210| 0d 09 09 09 09 09 09 62 | 6f 75 6e 64 73 52 65 63 |.......b|oundsRec|
|00005220| 74 2e 74 6f 70 20 2b 3d | 20 47 65 74 4d 42 61 72 |t.top +=| GetMBar|
|00005230| 07 43 53 41 70 70 2e 68 | 02 00 00 00 54 45 58 54 |.CSApp.h|....TEXT|
|00005240| 4d 50 53 20 01 00 ff ff | ff ff 00 00 00 00 39 d7 |MPS ....|......9.|
|00005250| 00 00 54 45 58 54 4d 50 | 53 20 01 00 ff ff ff ff |..TEXTMP|S ......|
|00005260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005270| 00 00 af 07 e7 8d 00 00 | 51 56 00 00 01 ac 09 09 |........|QV......|
|00005280| 09 09 63 61 73 65 20 69 | 6e 47 72 6f 77 3a 0d 09 |..case i|nGrow:..|
|00005290| 09 09 09 09 69 66 20 28 | 28 47 65 74 4d 4d 57 69 |....if (|(GetMMWi|
|000052a0| 6e 64 6f 77 28 29 20 21 | 3d 20 4e 55 4c 4c 29 20 |ndow() !|= NULL) |
|000052b0| 26 26 20 28 74 61 72 67 | 65 74 20 21 3d 20 46 72 |&& (targ|et != Fr|
|000052c0| 6f 6e 74 57 69 6e 64 6f | 77 28 29 29 29 20 7b 0d |ontWindo|w())) {.|
|000052d0| 09 09 09 09 09 09 53 79 | 73 42 65 65 70 28 31 29 |......Sy|sBeep(1)|
|000052e0| 3b 0d 09 09 09 09 09 7d | 20 65 6c 73 65 20 7b 0d |;......}| else {.|
|000052f0| 09 09 09 09 09 7d 0d 09 | 09 09 09 09 62 72 65 61 |.....}..|....brea|
|00005300| 00 00 00 48 00 09 47 65 | 6e 65 76 61 00 64 65 66 |...H..Ge|neva.def|
|00005310| 03 df b2 20 64 20 28 2a | 4d 65 6e 75 48 61 6e 64 |... d (*|MenuHand|
|00005320| 6c 65 72 46 75 6e 00 03 | 00 08 00 31 00 12 02 76 |lerFun..|...1...v|
|00005330| 02 8f 00 31 00 12 02 76 | 02 8f b0 5f 53 05 00 00 |...1...v|..._S...|
|00005340| 02 c2 00 00 02 c2 00 00 | 00 00 01 00 00 00 00 1e |........|........|
|00005350| 00 31 00 12 02 76 02 8f | 00 31 00 12 02 76 02 8f |.1...v..|.1...v..|
|00005360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005370| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 03 d6 |.....n..|.n...>..|
|00005380| 71 38 26 32 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |q8&2....|.>..MPSR|
|00005390| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|000053a0| 03 f0 ff ff 00 00 00 4c | 03 d7 c9 b4 00 00 00 00 |.......L|........|
|000053b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+